SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Clovis G. <cl...@pe...> - 2005年12月22日 12:09:58
Consider the following code (adapted from shared_axis_demo.py):
from pylab import *
t = arange(0.01, 5.0, 0.01)
s1 = sin(2*pi*t)
s2 = sin(4*pi*t)
s3 = sin(6*pi*t)
ax1 = subplot(311)
plot(t,s1)
grid('True')
ax2 = subplot(312, sharex=ax1)
plot(t, s2)
grid('True')
ax3 = subplot(313, sharex=ax1)
plot(t, s3)
grid('True')
show()
When I use the zoom feature of the NavigationToolbar, the xaxis is 
shared between all 3 graphs.
But the yaxis limits are free. Obviously, they could also be shared but 
this is not want I want.
I would like to "force" or "freeze" the Y axis to a given value. 
Consequently, the zoom feature would act only
along the X axis.
Any ideas??
Clovis Goldemberg
University of Sao Paulo
From: John H. <jdh...@ac...> - 2005年12月22日 13:01:53
>>>>> "Clovis" == Clovis Goldemberg <cl...@pe...> writes:
 Clovis> When I use the zoom feature of the NavigationToolbar, the
 Clovis> xaxis is shared between all 3 graphs. But the yaxis
 Clovis> limits are free. Obviously, they could also be shared but
 Clovis> this is not want I want. I would like to "force" or
 Clovis> "freeze" the Y axis to a given value. Consequently, the
 Clovis> zoom feature would act only along the X axis.
When using the right mouse zoom in pan/zoom mode, if you hold 'x' down
the zoom will only be in the x direction. ditto for 'y'. It would be
nice to support this for zoom to rect as well. On the todo list!
JDH
From: Clovis G. <cl...@pe...> - 2005年12月22日 13:27:08
Dear John,
Thanks for your support.
Pressing the X/Y key works fine in the pan menu! I tested it!
But my first suggestion would be an additional keyword in the subplot 
command, something like:
ax2 = subplot(312, sharex=ax1, freezey=True)
In fact, there would be necessary 2 additional keywords (freezex, 
freezey) that would disable
limit changes after the subplot creation. Obviouly, if freezey=False or 
None, the axis limits would
be free to be changed by the zooming tool.
Clovis
John Hunter wrote:
>>>>>>"Clovis" == Clovis Goldemberg <cl...@pe...> writes:
>>>>>> 
>>>>>>
>
> Clovis> When I use the zoom feature of the NavigationToolbar, the
> Clovis> xaxis is shared between all 3 graphs. But the yaxis
> Clovis> limits are free. Obviously, they could also be shared but
> Clovis> this is not want I want. I would like to "force" or
> Clovis> "freeze" the Y axis to a given value. Consequently, the
> Clovis> zoom feature would act only along the X axis.
>
>When using the right mouse zoom in pan/zoom mode, if you hold 'x' down
>the zoom will only be in the x direction. ditto for 'y'. It would be
>nice to support this for zoom to rect as well. On the todo list!
>
>JDH
>
>
>-------------------------------------------------------
>This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
>for problems? Stop! Download the new AJAX search engine that makes
>searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
>http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
>_______________________________________________
>Matplotlib-users mailing list
>Mat...@li...
>https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>
> 
>
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /