Ask Your Question
2

reverse y-axis graph

asked 2019-06-06 11:40:41 +0100

Markio gravatar image

I'm sorry for asking trivial things, but I can't find this in the reference manual. I have produced a graph by plotting a function simply by putting a minus sign in front of the function. But I actually want to reverse the axis to get positive values in the downward direction. Is it possible to achieve this? (I am unable to post the graph, because my karma < 60)

w1_plot = plot(-w1_numerical, (x,0,3000), linestyle=":", gridlines=True, legend_label='$w_1$'
edit retag flag offensive close merge delete

Comments

This is similar to a previously asked question:

slelievre gravatar imageslelievre ( 2019-06-06 22:22:00 +0100 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-06-06 13:37:00 +0100

Juanjo gravatar image

Add the keys ymin and ymax with suitable values. For example, compare the graphs given by

plot(x*sin(pi*x)^2, (x,0,2))

and

plot(x*sin(pi*x)^2, (x,0,2), ymin=2, ymax=0)
edit flag offensive delete link more

Comments

Thank you!

Markio gravatar imageMarkio ( 2019-06-08 15:32:59 +0100 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-06-06 11:40:41 +0100

Seen: 844 times

Last updated: Jun 06 '19