Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project!

## Re: [Matplotlib-users] matplotlib priorities

 Re: [Matplotlib-users] matplotlib priorities From: John Hunter - 2004-05-04 14:39:41 ```>>>>> "Humufr" == Humufr writes: Humufr> There are something I did't see in the list (but perhaps Humufr> it's possible to do now) and that I think will be useful Humufr> for astronomer. it's to plot an image with axes in Humufr> astronomical unit (RA and Dec) Humufr> like this function in pgplot: Humufr> http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX Humufr> thanks for this software who are very good, The new ticker code was designed to support exactly this kind of application. The documentation http://matplotlib.sourceforge.net/matplotlib.ticker.html details this process. That code defines a lot of preset tick locators and formatters but was primarily designed to be user extensible. Since I'm not an astronomer, I'm probably not the best person to write this, but it would be fairly easy to subclass matplotlib.ticker.Locator and matplotlib.ticker.Formatter to provide exactly this functionality. Here is a simple example showing how to use a user defined function to format the ticks (millions of dollars in this case) from matplotlib.ticker import FuncFormatter from matplotlib.matlab import * x = arange(4) money = [1.5e5, 2.5e6, 5.5e6, 2.0e7] def millions(x, pos): 'The two args are the value and tick position' return '\$%1.1fM' % (x*1e-6) formatter = FuncFormatter(millions) ax = subplot(111) ax.yaxis.set_major_formatter(formatter) bar(x, money) ax.set_xticks( x + 0.5) ax.set_xticklabels( ('Bill', 'Fred', 'Mary', 'Sue') ) show() In you case however, you would probably want to define new classes that derive from Locator and Formatter (you can follow the example of the many custom locators and formatters in matplotlib.ticker). If you do, please send the classes in with an example so I can include them in the standard distribution. If you don't want to do this, I'm sure one of the stsci guys will do this since they have expressed interest in this as well. JDH ```

 [Matplotlib-users] matplotlib priorities From: John Hunter - 2004-05-03 21:39:53 ```Perry Greenfield has spent a fair amount of time talking with me and the folks working at stsci on matplotlib to come up with a set of goals and priorities for near term development, and has thoroughly revamped the goals page http://matplotlib.sourceforge.net/goals.html We hope that this page will stay much more current than the last page, which grew fairly static as most of the goals at the time the page was created were fulfilled. Take a look over the list and speak up for anything we may have overlooked. JDH ```
 Re: [Matplotlib-users] matplotlib priorities From: Al Schapira - 2004-05-03 21:53:49 ```On Mon, 2004-05-03 at 17:17, John Hunter wrote: > Perry Greenfield has spent a fair amount of time talking with me and > the folks working at stsci on matplotlib to come up with a set of > goals and priorities for near term development, and has thoroughly > revamped the goals page > > http://matplotlib.sourceforge.net/goals.html > > We hope that this page will stay much more current than the last page, > which grew fairly static as most of the goals at the time the page was > created were fulfilled. > > Take a look over the list and speak up for anything we may have > overlooked. > > JDH Just so it doesn't slip through the cracks, please add support for multi-line text (embedded '\n's) especially in ticklabels to the near term goals. Thanks. -Al Schapira ```
 Re: [Matplotlib-users] matplotlib priorities From: Humufr - 2004-05-03 22:23:58 ```There are something I did't see in the list (but perhaps it's possible to do now) and that I think will be useful for astronomer. it's to plot an image with axes in astronomical unit (RA and Dec) like this function in pgplot: http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX thanks for this software who are very good, Nicolas Gruel John Hunter wrote: >Perry Greenfield has spent a fair amount of time talking with me and >the folks working at stsci on matplotlib to come up with a set of >goals and priorities for near term development, and has thoroughly >revamped the goals page > > http://matplotlib.sourceforge.net/goals.html > >We hope that this page will stay much more current than the last page, >which grew fairly static as most of the goals at the time the page was >created were fulfilled. > >Take a look over the list and speak up for anything we may have >overlooked. > >JDH > > >------------------------------------------------------- >This SF.Net email is sponsored by: Oracle 10g >Get certified on the hottest thing ever to hit the market... Oracle 10g. >Take an Oracle 10g class now, and we'll give you the exam FREE. >http://ads.osdn.com/?ad_id=3149&alloc_id=8166&op=click >_______________________________________________ >Matplotlib-users mailing list >Matplotlib-users@... >https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > ```
 Re: [Matplotlib-users] matplotlib priorities From: John Hunter - 2004-05-04 14:39:41 ```>>>>> "Humufr" == Humufr writes: Humufr> There are something I did't see in the list (but perhaps Humufr> it's possible to do now) and that I think will be useful Humufr> for astronomer. it's to plot an image with axes in Humufr> astronomical unit (RA and Dec) Humufr> like this function in pgplot: Humufr> http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX Humufr> thanks for this software who are very good, The new ticker code was designed to support exactly this kind of application. The documentation http://matplotlib.sourceforge.net/matplotlib.ticker.html details this process. That code defines a lot of preset tick locators and formatters but was primarily designed to be user extensible. Since I'm not an astronomer, I'm probably not the best person to write this, but it would be fairly easy to subclass matplotlib.ticker.Locator and matplotlib.ticker.Formatter to provide exactly this functionality. Here is a simple example showing how to use a user defined function to format the ticks (millions of dollars in this case) from matplotlib.ticker import FuncFormatter from matplotlib.matlab import * x = arange(4) money = [1.5e5, 2.5e6, 5.5e6, 2.0e7] def millions(x, pos): 'The two args are the value and tick position' return '\$%1.1fM' % (x*1e-6) formatter = FuncFormatter(millions) ax = subplot(111) ax.yaxis.set_major_formatter(formatter) bar(x, money) ax.set_xticks( x + 0.5) ax.set_xticklabels( ('Bill', 'Fred', 'Mary', 'Sue') ) show() In you case however, you would probably want to define new classes that derive from Locator and Formatter (you can follow the example of the many custom locators and formatters in matplotlib.ticker). If you do, please send the classes in with an example so I can include them in the standard distribution. If you don't want to do this, I'm sure one of the stsci guys will do this since they have expressed interest in this as well. JDH ```
 RE: [Matplotlib-users] matplotlib priorities From: Perry Greenfield - 2004-05-04 14:45:10 ```John Hunter wrote: > > Humufr> There are something I did't see in the list (but perhaps > Humufr> it's possible to do now) and that I think will be useful > Humufr> for astronomer. it's to plot an image with axes in > Humufr> astronomical unit (RA and Dec) > > Humufr> like this function in pgplot: > > Humufr> > http://www.astro.caltech.edu/~tjp/pgplot/subroutines.html#PGTBOX > > Humufr> thanks for this software who are very good, > > The new ticker code was designed to support exactly this kind of > application. The documentation > http://matplotlib.sourceforge.net/matplotlib.ticker.html details this > process. That code defines a lot of preset tick locators and > formatters but was primarily designed to be user extensible. > > Since I'm not an astronomer, I'm probably not the best person to write > this, but it would be fairly easy to subclass > matplotlib.ticker.Locator and matplotlib.ticker.Formatter to provide > exactly this functionality. > We are astronomers and we do intend to write tools to allow this. We haven't done this yet but it is fairly high on our list of things to do. I didn't think that such a specialized thing was needed on the generalized goals. You are welcome to write one if you need it sooner of course. Perry Greenfield ```
 Re: [Matplotlib-users] matplotlib priorities From: Srinath Avadhanula - 2004-05-04 01:08:41 ```On Mon, 3 May 2004, John Hunter wrote: > http://matplotlib.sourceforge.net/goals.html > > Take a look over the list and speak up for anything we may have > overlooked. > A few feature requests :) 1. Solve the problem where the lines are not displayed correctly when the axis limits after zooming are much smaller than the axis limits when the plot is first created. This has something to do with the backends not being able to handle negative coordinates. 2. Enable zooming in both X and Y with the mouse by allowing the user to choose a rectangle. This might behave like the matlab "zoom" function taking arguments like zoom xon zoom yon zoom I did a simple implementation of this for the GTK backend, but a more general implementation could be done easily depending on the already planned "Cursor read function" enhancement. Srinath ```