I'm trying to make the transformation shown below. In particular the x-axis must also be at the top.
This is the command for the left hand side graph:
ggplot(data = dataset, aes(x = xer_filename, y = unpivot_val, group = task_code)) + geom_line() + geom_point()
I'm trying the below (swapping x and y, and using scale_x_discrete) but am getting an error I don't understand:
ggplot(data = dataset, aes(x = unpivot_val, y = xer_filename, group = task_code)) + geom_line() + geom_point() + scale_x_discrete(position="top")
Thanks