Re: [Matplotlib-users] xticks when using twinx()

2012-03-20 Thread Moore, Eric (NIH/NIDDK) [F]
> -Original Message- > From: Moore, Eric (NIH/NIDDK) [F] > Sent: Monday, March 19, 2012 1:48 PM > To: matplotlib-users > Subject: Re: [Matplotlib-users] xticks when using twinx() > > Mario, > > When you call fig.add_subplot as you are doing, ax1 is None.

Re: [Matplotlib-users] xticks when using twinx()

2012-03-19 Thread Moore, Eric (NIH/NIDDK) [F]
alling ax1.set_xticks([10,40,90]) or equivalently ax2.set_xticks([10,40,90]). Eric > -Original Message- > From: Mario Konschake [mailto:mario.konsch...@gmail.com] > Sent: Monday, March 19, 2012 1:11 PM > To: matplotlib-users > Subject: [Matplotlib-users] xticks when using twinx()

[Matplotlib-users] xticks when using twinx()

2012-03-19 Thread Mario Konschake
Hello, I to set custom xticks is usually used fig = plt.figure() ax1 = fig.add_subplot(xticks=[10,40,90]) plt.plot(range(100)) I now need to have a second y-axis and tried fig = plt.figure() ax1 = fig.add_subplot(xticks=[10,40,90]) plt.plot(range(100)) ax2 = plt.twinx() plt.plot([x*x for x in