Ask Your Question
0

How to Change Ticks for Y axis Only?

asked 2014-07-26 23:07:48 +0100

Rongcui Dong gravatar image

I have a script plotting two numpy arrays using list_plot on semilogx scale. I am plotting angle on Y axis so I want 30/60/90 ticks, but I don't know how to change ticks on Y axis only without typing in anything about x axis. I can't find information about this on sage manual.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2014-07-26 23:12:36 +0100

Rongcui Dong gravatar image

OK, I solved it by adding

 ticks=[None, 30]

to the arguments of plot. There is one example in 2D Plotting page on manual, but it does not say it changes the Y axis and that None does not change the axis. A little bit unclear.

edit flag offensive delete link more

Comments

Good work! Can you suggest what a good example would be for adding to the manual? I agree that this is important to have clear.

kcrisman gravatar imagekcrisman ( 2014-08-02 03:26:15 +0100 )edit

For example(not tested), xx = np.logspace(1,100,1000) yy = np.linspace(-180,180,1000) list_plot(xx,yy,scale=semilogx,ticks=[None, 30])

Rongcui Dong gravatar imageRongcui Dong ( 2014-08-20 15:04:39 +0100 )edit
kcrisman gravatar imagekcrisman ( 2014-08-20 15:40:36 +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: 2014-07-26 23:07:48 +0100

Seen: 1,341 times

Last updated: Jul 26 '14