Screenshot instructions:
Windows
Mac
Red Hat Linux
Ubuntu
Click URL instructions:
Rightclick on ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)
From: thkoe002 <thkoe002@gm...>  20091012 10:59:21

Hello, I have the following problem. I want the axes (only the yaxis, to be exact) of a imshow() graph to be nonlinear. By default, the axis goes linearily from 0 to (number of pixels). With the [extent] keyword, I can change that to going linearly from (arbitrary start) to (arbitrary end). Now, I'd like the axis to be dependend on a (bijective) arbitrary function, for example y=p^2 (when p is the pixel number and y the yaxis coordinate). How can I achieve this? Thanks a lot, cheers Thomas  View this message in context: http://www.nabble.com/nonlinearaxesforimshowtp25853828p25853828.html Sent from the matplotlib  users mailing list archive at Nabble.com. 
From: Eric Firing <efiring@ha...>  20091012 19:59:22

thkoe002 wrote: > Hello, > > I have the following problem. I want the axes (only the yaxis, to be exact) > of a imshow() graph to be nonlinear. By default, the axis goes linearily > from 0 to (number of pixels). With the [extent] keyword, I can change that > to going linearly from (arbitrary start) to (arbitrary end). Now, I'd like > the axis to be dependend on a (bijective) arbitrary function, for example > y=p^2 (when p is the pixel number and y the yaxis coordinate). > How can I achieve this? > Thanks a lot, cheers > > Thomas See http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html Eric 
From: thkoe002 <thkoe002@gm...>  20091013 06:48:53

Hi Eric, thanks for the help, but this doesn't do what I want. I don't want to change the image in any way, I just want the axes to have a decreasing spacing. I made a small example with ms paint to clarify. http://www.nabble.com/file/p25867951/axes.png I could do this with ax.set_xticks() and ax.set_xticklabels(), but I was wondering if there is a way that also changes the whole coordinate system and not only the labeling. For example, the position of the mouse pointer will not be shown anymore when I use custom ax.set_xticklabels(). Cheers Thomas efiring wrote: > > thkoe002 wrote: >> Hello, >> >> I have the following problem. I want the axes (only the yaxis, to be >> exact) >> of a imshow() graph to be nonlinear. By default, the axis goes linearily >> from 0 to (number of pixels). With the [extent] keyword, I can change >> that >> to going linearly from (arbitrary start) to (arbitrary end). Now, I'd >> like >> the axis to be dependend on a (bijective) arbitrary function, for example >> y=p^2 (when p is the pixel number and y the yaxis coordinate). >> How can I achieve this? >> Thanks a lot, cheers >> >> Thomas > > See > http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html > > Eric > >  > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9  12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > >  View this message in context: http://www.nabble.com/nonlinearaxesforimshowtp25853828p25867951.html Sent from the matplotlib  users mailing list archive at Nabble.com. 
From: JaeJoon Lee <lee.j.joon@gm...>  20091013 16:18:26

On Tue, Oct 13, 2009 at 2:48 AM, thkoe002 <thkoe002@...> wrote: > > Hi Eric, > > thanks for the help, but this doesn't do what I want. > I don't want to change the image in any way, I just want the axes to have a > decreasing spacing. I made a small example with ms paint to clarify. > > http://www.nabble.com/file/p25867951/axes.png > > I could do this with ax.set_xticks() and ax.set_xticklabels(), but I was > wondering if there is a way that also changes the whole coordinate system > and not only the labeling. For example, the position of the mouse pointer > will not be shown anymore when I use custom ax.set_xticklabels(). > It depends on how far you want to go. * Manually setting ticks is a easiest solution, I guess. * The next step would be to create your custom tick locator & formatter http://matplotlib.sourceforge.net/api/ticker_api.html While this is not that difficult, you will need to spend some time. * axes_grid toolkit has limited support for arbitrary coordinate system. http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html * create your own projection. http://matplotlib.sourceforge.net/devel/add_new_projection.html Unless you're familiar with matplotlib and some of it internals, the last two options is not recommended. Regards, JJ > Cheers > > Thomas > > > > efiring wrote: >> >> thkoe002 wrote: >>> Hello, >>> >>> I have the following problem. I want the axes (only the yaxis, to be >>> exact) >>> of a imshow() graph to be nonlinear. By default, the axis goes linearily >>> from 0 to (number of pixels). With the [extent] keyword, I can change >>> that >>> to going linearly from (arbitrary start) to (arbitrary end). Now, I'd >>> like >>> the axis to be dependend on a (bijective) arbitrary function, for example >>> y=p^2 (when p is the pixel number and y the yaxis coordinate). >>> How can I achieve this? >>> Thanks a lot, cheers >>> >>> Thomas >> >> See >> http://matplotlib.sourceforge.net/examples/pylab_examples/image_nonuniform.html >> >> Eric >> >>  >> Come build with us! The BlackBerry(R) Developer Conference in SF, CA >> is the only developer event you need to attend this year. Jumpstart your >> developing skills, take BlackBerry mobile applications to market and stay >> ahead of the curve. Join us from November 9  12, 2009. Register now! >> http://p.sf.net/sfu/devconference >> _______________________________________________ >> Matplotlibusers mailing list >> Matplotlibusers@... >> https://lists.sourceforge.net/lists/listinfo/matplotlibusers >> >> > >  > View this message in context: http://www.nabble.com/nonlinearaxesforimshowtp25853828p25867951.html > Sent from the matplotlib  users mailing list archive at Nabble.com. > > >  > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9  12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlibusers mailing list > Matplotlibusers@... > https://lists.sourceforge.net/lists/listinfo/matplotlibusers > 
From: thkoe002 <thkoe002@gm...>  20091014 14:15:23

Hi JJ, thanks a lot for your help. I think that http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html has everything I need, I'll try it out. The coordinates given by the mouse are off, but that seems to be the case even for the far more elaborate "custom scale/projection" example ( examples/api/custom_scale_example.py ), and it's not that important. Thanks, cheers Thomas >It depends on how far you want to go. > >* Manually setting ticks is a easiest solution, I guess. > >* The next step would be to create your custom tick locator & formatter > >http://matplotlib.sourceforge.net/api/ticker_api.html > >While this is not that difficult, you will need to spend some time. > >* axes_grid toolkit has limited support for arbitrary coordinate system. > >http://matplotlib.sourceforge.net/examples/axes_grid/demo_curvelinear_grid.html > >* create your own projection. > >http://matplotlib.sourceforge.net/devel/add_new_projection.html > >Unless you're familiar with matplotlib and some of it internals, the >last two options is not recommended. >Regards, > >JJ  View this message in context: http://www.nabble.com/nonlinearaxesforimshowtp25853828p25891899.html Sent from the matplotlib  users mailing list archive at Nabble.com. 
Sign up for the SourceForge newsletter:
No, thanks