You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(3) |
Jun
|
Jul
|
Aug
(12) |
Sep
(12) |
Oct
(56) |
Nov
(65) |
Dec
(37) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(59) |
Feb
(78) |
Mar
(153) |
Apr
(205) |
May
(184) |
Jun
(123) |
Jul
(171) |
Aug
(156) |
Sep
(190) |
Oct
(120) |
Nov
(154) |
Dec
(223) |
2005 |
Jan
(184) |
Feb
(267) |
Mar
(214) |
Apr
(286) |
May
(320) |
Jun
(299) |
Jul
(348) |
Aug
(283) |
Sep
(355) |
Oct
(293) |
Nov
(232) |
Dec
(203) |
2006 |
Jan
(352) |
Feb
(358) |
Mar
(403) |
Apr
(313) |
May
(165) |
Jun
(281) |
Jul
(316) |
Aug
(228) |
Sep
(279) |
Oct
(243) |
Nov
(315) |
Dec
(345) |
2007 |
Jan
(260) |
Feb
(323) |
Mar
(340) |
Apr
(319) |
May
(290) |
Jun
(296) |
Jul
(221) |
Aug
(292) |
Sep
(242) |
Oct
(248) |
Nov
(242) |
Dec
(332) |
2008 |
Jan
(312) |
Feb
(359) |
Mar
(454) |
Apr
(287) |
May
(340) |
Jun
(450) |
Jul
(403) |
Aug
(324) |
Sep
(349) |
Oct
(385) |
Nov
(363) |
Dec
(437) |
2009 |
Jan
(500) |
Feb
(301) |
Mar
(409) |
Apr
(486) |
May
(545) |
Jun
(391) |
Jul
(518) |
Aug
(497) |
Sep
(492) |
Oct
(429) |
Nov
(357) |
Dec
(310) |
2010 |
Jan
(371) |
Feb
(657) |
Mar
(519) |
Apr
(432) |
May
(312) |
Jun
(416) |
Jul
(477) |
Aug
(386) |
Sep
(419) |
Oct
(435) |
Nov
(320) |
Dec
(202) |
2011 |
Jan
(321) |
Feb
(413) |
Mar
(299) |
Apr
(215) |
May
(284) |
Jun
(203) |
Jul
(207) |
Aug
(314) |
Sep
(321) |
Oct
(259) |
Nov
(347) |
Dec
(209) |
2012 |
Jan
(322) |
Feb
(414) |
Mar
(377) |
Apr
(179) |
May
(173) |
Jun
(234) |
Jul
(295) |
Aug
(239) |
Sep
(276) |
Oct
(355) |
Nov
(144) |
Dec
(108) |
2013 |
Jan
(170) |
Feb
(89) |
Mar
(204) |
Apr
(133) |
May
(142) |
Jun
(89) |
Jul
(160) |
Aug
(180) |
Sep
(69) |
Oct
(136) |
Nov
(83) |
Dec
(32) |
2014 |
Jan
(71) |
Feb
(90) |
Mar
(161) |
Apr
(117) |
May
(78) |
Jun
(94) |
Jul
(60) |
Aug
(83) |
Sep
(102) |
Oct
(132) |
Nov
(154) |
Dec
(96) |
2015 |
Jan
(45) |
Feb
(138) |
Mar
(176) |
Apr
(132) |
May
(119) |
Jun
(124) |
Jul
(77) |
Aug
(31) |
Sep
(34) |
Oct
(22) |
Nov
(23) |
Dec
(9) |
2016 |
Jan
(26) |
Feb
(17) |
Mar
(10) |
Apr
(8) |
May
(4) |
Jun
(8) |
Jul
(6) |
Aug
(5) |
Sep
(9) |
Oct
(4) |
Nov
|
Dec
|
2017 |
Jan
(5) |
Feb
(7) |
Mar
(1) |
Apr
(5) |
May
|
Jun
(3) |
Jul
(6) |
Aug
(1) |
Sep
|
Oct
(2) |
Nov
(1) |
Dec
|
2018 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2025 |
Jan
(1) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
S | M | T | W | T | F | S |
---|---|---|---|---|---|---|
1
(2) |
2
(3) |
3
(14) |
4
(11) |
5
(10) |
6
(7) |
7
|
8
(3) |
9
(16) |
10
(9) |
11
(12) |
12
(1) |
13
(14) |
14
(10) |
15
|
16
(1) |
17
(7) |
18
(9) |
19
(7) |
20
(10) |
21
|
22
(1) |
23
|
24
(1) |
25
(5) |
26
(7) |
27
(1) |
28
|
29
(2) |
30
(2) |
31
(11) |
|
|
|
|
On Mon, Mar 9, 2015 at 7:31 AM, Prahas David Nafissian <pra...@gm...> wrote: > Hi, > > I want to create an animation of the Lorenz attractor, > plotting each new point as it is generated by the > equations. So we see the graph "being drawn" > over time. You will very likely need to use the animation API for this. I recently tried to demonstrate the Henon function in a fashion that it appears I am drawing it over time: https://www.youtube.com/watch?v=76ll818RlpQ You can see the code linked from there: https://github.com/amitsaha/playground/blob/master/recipes/henon_animation.py That might give you a starting point of what you are trying to do. > > Also, as it is being drawn, I want to be able to > rotate the screen in 3 dimensions. Sorry, nothing much I can add here. Best, Amit. -- http://echorand.me
Hi, I want to create an animation of the Lorenz attractor, plotting each new point as it is generated by the equations. So we see the graph "being drawn" over time. Also, as it is being drawn, I want to be able to rotate the screen in 3 dimensions. Will MatPlot do this on a Mac (10.8.5)? Thanks! PS -- here is code using MatPlot to create the "full" Lorenz: http://matplotlib.org/examples/mplot3d/lorenz_attractor.html
My knee-jerk reaction is to move the definition of `format` outside of the `Visualize.__init__` method. If you need to have hooks back into the visualize method I would use a function factory + weak refs or a class (again with weakrefs) with a `__call__` method. Tom On Sun, Mar 8, 2015 at 3:35 PM Sebastian Berg <seb...@si...> wrote: > Hey, > > probably there is nothing to help me here, but I have a QtGui, using > matplotlib and basically end up in a circular reference hell that is not > resolvable by the gc. After removing almost all circular references, the > python inherited QWidget that embeds the figurecanvas is now deleted > fine. > > The thing I end up with however is something like > > class Visualize(object): > def __init__(self): > self.figure = Figure() > canvas = FigureCanvas(self.figure) > PythonInheritedQtWidget(self).element.setWidget(canvas) > > def format(*args): > # do stuff > return something > self.axis = self.figure.add_subplot(1, 1, 1) > self.axis.format_coord = format > > # This was completely drawn with canvas and all > # PythonInheritedQtWidget is deleted fine. > > I have not been able to get a minimal test case. But I have it pinned > down that everything can get cleaned up after: > > del Visualize.axes.format_coord > > so the circular reference that makes it not collectable is only the > format_coord which is a method pointing to the class owning the figure > and the axis. I am about to just use a weak reference wrapper function > to break the circle but it seems silly. > > Anyway, I do not expect that anyone can help, and I expect it is some Qt > stuff really, but this is seriously annoying me.... > > - Sebastian > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hey, probably there is nothing to help me here, but I have a QtGui, using matplotlib and basically end up in a circular reference hell that is not resolvable by the gc. After removing almost all circular references, the python inherited QWidget that embeds the figurecanvas is now deleted fine. The thing I end up with however is something like class Visualize(object): def __init__(self): self.figure = Figure() canvas = FigureCanvas(self.figure) PythonInheritedQtWidget(self).element.setWidget(canvas) def format(*args): # do stuff return something self.axis = self.figure.add_subplot(1, 1, 1) self.axis.format_coord = format # This was completely drawn with canvas and all # PythonInheritedQtWidget is deleted fine. I have not been able to get a minimal test case. But I have it pinned down that everything can get cleaned up after: del Visualize.axes.format_coord so the circular reference that makes it not collectable is only the format_coord which is a method pointing to the class owning the figure and the axis. I am about to just use a weak reference wrapper function to break the circle but it seems silly. Anyway, I do not expect that anyone can help, and I expect it is some Qt stuff really, but this is seriously annoying me.... - Sebastian
This package is indeeed pretty nice, and I will surely take a look into it, but the way styles are added does not seem quite practical or shareable. In my opinion, having a style file for each paper makes things more flexible, although this package may get more control out of the box. Also, not being built-in makes you install an other package, and I think some people either do not want to do it, nor know how to do it. On an other topic, I started working on some of the features you wanted to integrate with your PR <https://github.com/matplotlib/matplotlib/pull/2702>. I guessed that when you talked about adding the |set_ticks_location| to the rcParams, you wanted to control whether the ticks are in or out of the axes box? Finally, I added a |style| parameter to the rcParams. It lets you choose from your |matplotlibrc| which style you want to use. On top of that, I made it recursive, so that you can design a style directly from other styles. The only thing I could not get to work was to have your style loading directly when importing matplotlib (when defining from your rc file). You actually have to import the |matplotlib.style| lib to get your rc defined style to load up. I will continue working on the other features described in olga’s PR <https://github.com/matplotlib/matplotlib/pull/2702> before submitting one on my own. But if you want to take a look, and tell me how I can improve what I did, you can find it on my repo <https://github.com/Mrngilles/matplotlib>. Thanks Marin Le 06/03/2015 22:18, Olga Botvinnik a écrit : > There's also the "plotsettings" package which makes it easy to switch > between styles required by different papers. > > https://pypi.python.org/pypi/plotsettings > > On Wed, Mar 4, 2015 at 1:29 PM Marin GILLES <mrn...@gm... > <mailto:mrn...@gm...>> wrote: > > Le 04/03/2015 06:21, Tony Yu a écrit : >> On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever >> <gok...@gm... <mailto:gok...@gm...>> wrote: >> >> I see seaborn has "paper, notebook, talk, and poster" options. >> http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html >> <http://stanford.edu/%7Emwaskom/software/seaborn-dev/aesthetics.html> >> Apperantly he scales each parameter to get modified views. >> This would be a good addition for any of the styles available >> in matplotlib. >> >> >> A similar pattern with `matplotlib.style` would use chained >> stylesheets. The idea would be to make stylesheets either >> aesthetics focused or layout focused. By aesthetics, I mean >> things like colors and marker shape, and by layout, I mean things >> like default figure size, figure padding, font size, etc. Then >> you can easily have a style that defines the general aesthetics >> and easily modify it for papers, talks, etc. >> >> Here's an example from `mpltools`, but the same syntax applies to >> the `style` module in `matplotlib`: >> >> http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html >> >> (PoF = Physics of Fluids journal; IIRC I think I have some >> personal stylesheets that take the normal two-column figure >> layout and convert it to a full-page layout.) >> >> -Tony >> >> >> On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES >> <mrn...@gm... <mailto:mrn...@gm...>> wrote: >> >> Le 03/03/2015 18:15, Gökhan Sever a écrit : >>> >>> >>> On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES >>> <mrn...@gm... <mailto:mrn...@gm...>> wrote: >>> >>>> >>> Sure, I'll be careful about that. >>> I'm going to go try and design some new interesting >>> ones. >>> Maybe adding some styles specific to some plot types >>> could be useful. >>> Also some styles specific for some applications >>> (geoscience, biology)? >>> If you have any other ideas, please let me know. >>> >>> -- >>> *Marin GILLES* >>> >>> >>> It would be good to have styles for "paper" and >>> "presentation" modes. The former would have smaller >>> ticks, labels, linewidths, other axis elements that goes >>> into a journal publication, while the latter with much >>> magnified elements to be clearly visible on a screen >>> from the back of a room. >> Indeed it would be a very good idea. >> I've seen that already in the seaborn lib I guess. >> >> -- >> *Marin GILLES* >> /PhD student CNRS >> / /Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) >> UMR 6303 CNRS - Université de Bourgogne >> 9 av Alain Savary, BP 47870 >> 21078, Dijon (France) >> / ☎ (+33)6.79.35.30.11 <tel:%28%2B33%296.79.35.30.11> >> ✉ mar...@u-... >> <mailto:mar...@u-...> >> >> >> >> >> -- >> Gökhan >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel >> Website, sponsored >> by Intel and developed in partnership with Slashdot Media, is >> your hub for all >> things parallel software development, from weekly thought >> leadership blogs to >> news, videos, case studies, tutorials and more. Take a look >> and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> <mailto:Mat...@li...> >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > Hi, > > I started working on styles based on which support the figure is > designed for (as of now, I've got 'paper', 'notebook', 'talk', > 'poster'). > > For those, in a style point of view, I think only the text size > should be modified (got it done, just need to get the proper sizes > for each style), which is unlike the 'seaborn' way of doing it. > Thing is, by doing so, we don't mess with any style we could apply > using Cascading styles. > > Also, I was thinking that I should set the export settings for > each of those styles, but also get an export style folder (with a > few good parameters). This would mean no more need to adjust dpi, > file format, figure size... > > Finally, I could add a folder for specific papers, in which the > figure parameters would be tweaked so that we can directly be in a > specific paper format. I guess it would take into account both > text size and export parameters for each paper. > > Let me know what you think about it. > > > Marin Gilles > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel > Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your > hub for all > things parallel software development, from weekly thought > leadership blogs to > news, videos, case studies, tutorials and more. Take a look and > join the > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
There's also the "plotsettings" package which makes it easy to switch between styles required by different papers. https://pypi.python.org/pypi/plotsettings On Wed, Mar 4, 2015 at 1:29 PM Marin GILLES <mrn...@gm...> wrote: > Le 04/03/2015 06:21, Tony Yu a écrit : > > On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever <gok...@gm...> > wrote: > >> I see seaborn has "paper, notebook, talk, and poster" options. >> http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html >> Apperantly he scales each parameter to get modified views. This would be >> a good addition for any of the styles available in matplotlib. >> > > A similar pattern with `matplotlib.style` would use chained stylesheets. > The idea would be to make stylesheets either aesthetics focused or layout > focused. By aesthetics, I mean things like colors and marker shape, and by > layout, I mean things like default figure size, figure padding, font size, > etc. Then you can easily have a style that defines the general aesthetics > and easily modify it for papers, talks, etc. > > Here's an example from `mpltools`, but the same syntax applies to the > `style` module in `matplotlib`: > > http://tonysyu.github.io/mpltools/auto_examples/style/ > plot_multiple_styles.html > > (PoF = Physics of Fluids journal; IIRC I think I have some personal > stylesheets that take the normal two-column figure layout and convert it to > a full-page layout.) > > -Tony > > >> >> On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES <mrn...@gm...> >> wrote: >> >>> Le 03/03/2015 18:15, Gökhan Sever a écrit : >>> >>> >>> >>> On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES <mrn...@gm...> >>> wrote: >>> >>>> >>>> Sure, I'll be careful about that. >>>> I'm going to go try and design some new interesting ones. >>>> Maybe adding some styles specific to some plot types could be useful. >>>> Also some styles specific for some applications (geoscience, biology)? >>>> If you have any other ideas, please let me know. >>>> >>>> -- >>>> *Marin GILLES* >>>> >>> >>> It would be good to have styles for "paper" and "presentation" modes. >>> The former would have smaller ticks, labels, linewidths, other axis >>> elements that goes into a journal publication, while the latter with much >>> magnified elements to be clearly visible on a screen from the back of a >>> room. >>> >>> Indeed it would be a very good idea. >>> I've seen that already in the seaborn lib I guess. >>> >>> -- >>> *Marin GILLES* >>> >>> *PhD student CNRS * >>> >>> >>> >>> * Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) UMR 6303 CNRS >>> - Université de Bourgogne 9 av Alain Savary, BP 47870 21078, Dijon (France) >>> * ☎ (+33)6.79.35.30.11 >>> ✉ mar...@u-... >>> >> >> >> >> -- >> Gökhan >> >> ------------------------------------------------------------ >> ------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, >> sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub >> for all >> things parallel software development, from weekly thought leadership >> blogs to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> > Hi, > > I started working on styles based on which support the figure is designed > for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). > > For those, in a style point of view, I think only the text size should be > modified (got it done, just need to get the proper sizes for each style), > which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we > don't mess with any style we could apply using Cascading styles. > > Also, I was thinking that I should set the export settings for each of > those styles, but also get an export style folder (with a few good > parameters). This would mean no more need to adjust dpi, file format, > figure size... > > Finally, I could add a folder for specific papers, in which the figure > parameters would be tweaked so that we can directly be in a specific paper > format. I guess it would take into account both text size and export > parameters for each paper. > > Let me know what you think about it. > > > Marin Gilles > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Hi, I guess I don't understand the "[axx for axx in ax.flat]" command, but this steals from all the axes. Cheers, Jody fig,ax = plt.subplots(2,2) for i in range(2): for j in range(2): im=ax[i,j].imshow(np.ones((20,20))) im.set_clim([-1.,2.]) cax,kw = mpl.colorbar.make_axes([axx for axx in ax.flat],shrink=0.5) plt.colorbar(im, cax=cax, **kw) > On Mar 6, 2015, at 9:39 AM, Eric Firing <ef...@ha...> wrote: > > On 2015年03月05日 11:36 PM, Dyah rahayu martiningrum wrote: >> Hello all, >> >> I make multi plot with colorbars. I need help, how do make only one >> colorbar for six panels? I also want to show only lowest x-axis. I copy >> my recent code and figure here. > > An old example of something like this is here: > > http://matplotlib.org/examples/pylab_examples/multi_image.html > > Eric > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
On 2015年03月05日 11:36 PM, Dyah rahayu martiningrum wrote: > Hello all, > > I make multi plot with colorbars. I need help, how do make only one > colorbar for six panels? I also want to show only lowest x-axis. I copy > my recent code and figure here. An old example of something like this is here: http://matplotlib.org/examples/pylab_examples/multi_image.html Eric
Hi, One final reminder that I am a mentor for two Google Summer of Code projects that involve extensive matplotlib GUI development for python scientific software. The INCF (incf.org) is sponsoring two GSOC projects that will directly benefit PyDSTool (http://pydstool.sf.net), a math modeling toolbox for science and engineering that some of you will know. One, if not both, of the projects will involve significant technical usage of MPL's 2D GUI widgets but, more excitingly, to build new types of model visualization tools over MPL. MPL has been chosen to maximize platform independence and minimize reliance on additional user installation of third party libraries, and is well suited for the prototyping of application front ends for research code. http://incf.org/gsoc/2015/proposals/#-span--span----nbsp---span---span--span-neuroscience-model-exploration-and-development-tools-for-pydstool--span- High level knowledge of math and the theoretical principles of cell biology are beneficial but not required. Applications can begin right away! Read more about the process here: http://www.google-melange.com/gsoc/homepage/google/gsoc2015 Thanks, Rob
Hi, . Your example is not much clear. It's better post some short example and a running piece of code. btw, maybe your problem should be solved with this post: http://stackoverflow.com/questions/13784201/matplotlib-2-subplots-1-colorbar Cheers, Arnaldo --- *Arnaldo D'Amaral Pereira Granja Russo* Lab. de Estudos dos Oceanos e Clima Instituto de Oceanografia - FURG 2015年03月06日 6:36 GMT-03:00 Dyah rahayu martiningrum <dya...@gm...>: > Hello all, > > I make multi plot with colorbars. I need help, how do make only one > colorbar for six panels? I also want to show only lowest x-axis. I copy my > recent code and figure here. > > # Open file > fd = nc.Dataset(fname, 'r') > > # Read variables > beam = fd.variables['beam'][:] > rng = fd.variables['range'][:] > tim = fd.variables['time'][:] > pwr = fd.variables['pwr'][:] > nfft = fd.variables['nfft'][0] > pn = fd.variables['pnoise'][:] > width=fd.variables['width'][:] > # Close netCDF file > fd.close() > > # Specify beam > ibeam = ibeams[i] > > # Time convertion > tim = tim/3600.0 > > #Plot > p_plot = pwr[ibeam] > for it in range(len(tim)): > p_plot[it] = p_plot[it] - pn[ibeam][it] - 10.*np.log10(nfft) > p_plot = p_plot.transpose() > > #Specify subplot > pl.subplot(611 + i) > #Contour plot > v= np.linspace(5., 50., 5., endpoint=True) > x= pl.contourf(tim, rng, p_plot, v, cmap=pl.cm.jet) > x = pl.colorbar(ticks=v) > x.ax.set_title('dB') > print x > > > # Set X and Y axis lower/uppser limit > set_xy = range(4) > set_xy[0] = 18.0 # x min > set_xy[1] = 30.0 # x max > set_xy[2] = 200.0 # y min > set_xy[3] = 550.0 # y max > pl.axis(set_xy) > > # Set labels > pl.xlabel('time (hours)') > pl.ylabel('range (km)') > pl.show() > > > Thank you.... > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Hello all, I make multi plot with colorbars. I need help, how do make only one colorbar for six panels? I also want to show only lowest x-axis. I copy my recent code and figure here. # Open file fd = nc.Dataset(fname, 'r') # Read variables beam = fd.variables['beam'][:] rng = fd.variables['range'][:] tim = fd.variables['time'][:] pwr = fd.variables['pwr'][:] nfft = fd.variables['nfft'][0] pn = fd.variables['pnoise'][:] width=fd.variables['width'][:] # Close netCDF file fd.close() # Specify beam ibeam = ibeams[i] # Time convertion tim = tim/3600.0 #Plot p_plot = pwr[ibeam] for it in range(len(tim)): p_plot[it] = p_plot[it] - pn[ibeam][it] - 10.*np.log10(nfft) p_plot = p_plot.transpose() #Specify subplot pl.subplot(611 + i) #Contour plot v= np.linspace(5., 50., 5., endpoint=True) x= pl.contourf(tim, rng, p_plot, v, cmap=pl.cm.jet) x = pl.colorbar(ticks=v) x.ax.set_title('dB') print x # Set X and Y axis lower/uppser limit set_xy = range(4) set_xy[0] = 18.0 # x min set_xy[1] = 30.0 # x max set_xy[2] = 200.0 # y min set_xy[3] = 550.0 # y max pl.axis(set_xy) # Set labels pl.xlabel('time (hours)') pl.ylabel('range (km)') pl.show() Thank you....
Ahh! Yes that is likely it. I assumed that relative dimensions were always with respect to the previous point, but they are always with respect to the previous non-control point. Thanks! Jason moorepants.info +01 530-601-9791 On Wed, Mar 4, 2015 at 10:36 PM, Nicolas P. Rougier < Nic...@in...> wrote: > > Actually, both syntax are valid. > > I think the problem in you svg parser is that you're changing the > reference point each time you iterate in points. > > For example consider the path: > > m 100,200 c 100,100 400,100 400,200 z => (m P0 c P1 P2 P3 z) > > Your parser ended with vertex at (100.0, -200.0), (200.0, -300.0), (600.0, > -400.0), (1000.0, -600.0) > > which corresponds to [P0, P0+P1, P1+P2, P2+P3] but you want [P0, P0+P1, > P0+P2, P0+P3] > > > Nicolas > > > > On 05 Mar 2015, at 00:35, Jason Moore <moo...@gm...> wrote: > > > > Actually the notation I have is valid SVG path data. Your script could > be modified to handle the more general forms, see: > > > > http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation > > > > But this still doesn't answer why the smoothness is different between > the SVG and matploblib paths. I haven't been able to figure that out yet. > > > > > > Jason > > moorepants.info > > +01 530-601-9791 > > > > On Wed, Mar 4, 2015 at 2:32 PM, Jason Moore <moo...@gm...> > wrote: > > Thanks Nicolas for your code. > > > > The difference in what I have and what you share is in the svg path > specification. For some reason Inkscape outputs a single leading "c" for > the bezier curve in my path whereas your path has a "c" for every three > points. I'm not quite sure the difference, maybe Inkscape outputs a > non-standard form. > > > > > > Jason > > moorepants.info > > +01 530-601-9791 > > > > On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier < > Nic...@in...> wrote: > > > > Here is a (limited) SVG path parser I made some time ago: > > > > > https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py > > > > > > The svg_parse function might just do what you're trying to achieve. > > > > > > Nicolas > > > > > On 04 Mar 2015, at 20:51, Jason Moore <moo...@gm...> wrote: > > > > > > Hi, > > > > > > I have some SVGs with closed Bezier curve paths that I'd like to > convert to matplotlib paths. > > > > > > For example, here is some code: > https://gist.github.com/moorepants/4cac02e798446bb46de7 > > > > > > The above script runs but the resulting path in matplotlib is less > smooth that when opened in inkscape, for example. I've attached screenshots. > > > > > > I'm not sure why there is a difference. > > > > > > Any suggestions to get my matplotlib curves looking as smooth as they > do in SVG format? > > > > > > Jason > > > moorepants.info > > > +01 530-601-9791 > > > > <Selection_057.png><Selection_058.png>------------------------------------------------------------------------------ > > > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > > > by Intel and developed in partnership with Slashdot Media, is your hub > for all > > > things parallel software development, from weekly thought leadership > blogs to > > > news, videos, case studies, tutorials and more. Take a look and join > the > > > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > > > Matplotlib-users mailing list > > > Mat...@li... > > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > > > >
This is a bit hacky, but there is apparently no validation that 'width' is positive. If you set the `width` kwarg to negative you effectively get to set the right edge. Tom On Thu, Mar 5, 2015 at 11:09 AM J. Daniel Fenn <fe...@bu...> wrote: > The bar plot options allow you to set align='center' or align='edge' > > But when it aligns on the edge, it always does left align. > > I can't find any documentation that allows me to align it as a right > align. Is this possible? > > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
On 2015年03月05日 6:11 AM, Marin GILLES wrote: > Hello everyone, > After working a bit on the styles, I noticed that some parameters could > not be modified using an rc or style file (for example, turning off the > right, left, up or down axis). I kind of saw how to do it using the > |Axis.spine.set_visible()| method, but it would be better to be able to > change it in the rc. > So I was wondering if there would be a way to add rcParameters using a > method with an external file, or if I would have to change this in the > mpl source? > Maybe a method that would add rcParameters on demand... > Thanks Marin, The sort of capability you are describing here is not possible with the present architecture. Eric
the rcparams are stored in a sub-class of dict which does both name and value validation on the way in. This is controlled by the class-level attribute `validate` (which is a dict mapping from key-name -> validation function). In principle you could update this dict to add rcparams on the fly, however if the plotting functions don't know to look at the rcparams they won't have any effect. To add new rcparams you need to modify the upstream code. There is a PR to add spine-related rcparams ( https://github.com/matplotlib/matplotlib/pull/2702) but it has not been active in a while. On Thu, Mar 5, 2015 at 11:12 AM Marin GILLES <mrn...@gm...> wrote: > Le 04/03/2015 23:31, Marin GILLES a écrit : > > Le 04/03/2015 22:46, Yuxiang Wang a écrit : > > Hi Marin, > > +1 for the idea of specific papers. For example, all PLOS require the > same figure format and I have my own config file. I'd be more than > happy to dig into it and try my best to contribute. > > Shawn > > On Wed, Mar 4, 2015 at 4:27 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> wrote: > > Le 04/03/2015 06:21, Tony Yu a écrit : > > On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever <gok...@gm...> <gok...@gm...> wrote: > > I see seaborn has "paper, notebook, talk, and poster" options.http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html > Apperantly he scales each parameter to get modified views. This would be a > good addition for any of the styles available in matplotlib. > > A similar pattern with `matplotlib.style` would use chained stylesheets. The > idea would be to make stylesheets either aesthetics focused or layout > focused. By aesthetics, I mean things like colors and marker shape, and by > layout, I mean things like default figure size, figure padding, font size, > etc. Then you can easily have a style that defines the general aesthetics > and easily modify it for papers, talks, etc. > > Here's an example from `mpltools`, but the same syntax applies to the > `style` module in `matplotlib`: > http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html > > (PoF = Physics of Fluids journal; IIRC I think I have some personal > stylesheets that take the normal two-column figure layout and convert it to > a full-page layout.) > > -Tony > > > On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> wrote: > > Le 03/03/2015 18:15, Gökhan Sever a écrit : > > > > On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> > wrote: > > Sure, I'll be careful about that. > I'm going to go try and design some new interesting ones. > Maybe adding some styles specific to some plot types could be useful. > Also some styles specific for some applications (geoscience, biology)? > If you have any other ideas, please let me know. > > -- > Marin GILLES > > It would be good to have styles for "paper" and "presentation" modes. The > former would have smaller ticks, labels, linewidths, other axis elements > that goes into a journal publication, while the latter with much magnified > elements to be clearly visible on a screen from the back of a room. > > Indeed it would be a very good idea. > I've seen that already in the seaborn lib I guess. > > -- > Marin GILLES > PhD student CNRS > Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) > UMR 6303 CNRS - Université de Bourgogne > 9 av Alain Savary, BP 47870 > 21078, Dijon (France) > ☎ (+33)6.79.35.30.11 > ✉ mar...@u-... > > > -- > Gökhan > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > Hi, > > I started working on styles based on which support the figure is designed > for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). > > For those, in a style point of view, I think only the text size should be > modified (got it done, just need to get the proper sizes for each style), > which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we > don't mess with any style we could apply using Cascading styles. > > Also, I was thinking that I should set the export settings for each of those > styles, but also get an export style folder (with a few good parameters). > This would mean no more need to adjust dpi, file format, figure size... > > Finally, I could add a folder for specific papers, in which the figure > parameters would be tweaked so that we can directly be in a specific paper > format. I guess it would take into account both text size and export > parameters for each paper. > > Let me know what you think about it. > > Marin Gilles > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > That would indeed would be nice, and get us started. > I created a repository <https://github.com/mrngilles/matplotlib-styles>, > if anyone wants to contribute. Don’t hesitate to bring in some new ideas. > > Marin Gilles > > > Hello everyone, > After working a bit on the styles, I noticed that some parameters could > not be modified using an rc or style file (for example, turning off the > right, left, up or down axis). I kind of saw how to do it using the > Axis.spine.set_visible() method, but it would be better to be able to > change it in the rc. > So I was wondering if there would be a way to add rcParameters using a > method with an external file, or if I would have to change this in the mpl > source? > Maybe a method that would add rcParameters on demand... > Thanks > > -- > *Marin GILLES* > > *PhD student CNRS * > > > > * Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) UMR 6303 CNRS - > Université de Bourgogne 9 av Alain Savary, BP 47870 21078, Dijon (France) * > ☎ (+33)6.79.35.30.11 > ✉ mar...@u-... > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Le 04/03/2015 23:31, Marin GILLES a écrit : > Le 04/03/2015 22:46, Yuxiang Wang a écrit : > >> Hi Marin, >> >> +1 for the idea of specific papers. For example, all PLOS require the >> same figure format and I have my own config file. I'd be more than >> happy to dig into it and try my best to contribute. >> >> Shawn >> >> On Wed, Mar 4, 2015 at 4:27 PM, Marin GILLES<mrn...@gm...> wrote: >>> Le 04/03/2015 06:21, Tony Yu a écrit : >>> >>> On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever<gok...@gm...> wrote: >>>> I see seaborn has "paper, notebook, talk, and poster" options. >>>> http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html >>>> Apperantly he scales each parameter to get modified views. This would be a >>>> good addition for any of the styles available in matplotlib. >>> A similar pattern with `matplotlib.style` would use chained stylesheets. The >>> idea would be to make stylesheets either aesthetics focused or layout >>> focused. By aesthetics, I mean things like colors and marker shape, and by >>> layout, I mean things like default figure size, figure padding, font size, >>> etc. Then you can easily have a style that defines the general aesthetics >>> and easily modify it for papers, talks, etc. >>> >>> Here's an example from `mpltools`, but the same syntax applies to the >>> `style` module in `matplotlib`: >>> >>> http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html >>> >>> (PoF = Physics of Fluids journal; IIRC I think I have some personal >>> stylesheets that take the normal two-column figure layout and convert it to >>> a full-page layout.) >>> >>> -Tony >>> >>>> On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES<mrn...@gm...> wrote: >>>>> Le 03/03/2015 18:15, Gökhan Sever a écrit : >>>>> >>>>> >>>>> >>>>> On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES<mrn...@gm...> >>>>> wrote: >>>>>> Sure, I'll be careful about that. >>>>>> I'm going to go try and design some new interesting ones. >>>>>> Maybe adding some styles specific to some plot types could be useful. >>>>>> Also some styles specific for some applications (geoscience, biology)? >>>>>> If you have any other ideas, please let me know. >>>>>> >>>>>> -- >>>>>> Marin GILLES >>>>> It would be good to have styles for "paper" and "presentation" modes. The >>>>> former would have smaller ticks, labels, linewidths, other axis elements >>>>> that goes into a journal publication, while the latter with much magnified >>>>> elements to be clearly visible on a screen from the back of a room. >>>>> >>>>> Indeed it would be a very good idea. >>>>> I've seen that already in the seaborn lib I guess. >>>>> >>>>> -- >>>>> Marin GILLES >>>>> PhD student CNRS >>>>> Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) >>>>> UMR 6303 CNRS - Université de Bourgogne >>>>> 9 av Alain Savary, BP 47870 >>>>> 21078, Dijon (France) >>>>> ☎ (+33)6.79.35.30.11 >>>>> ✉mar...@u-... >>>> -- >>>> Gökhan >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Dive into the World of Parallel Programming The Go Parallel Website, >>>> sponsored >>>> by Intel and developed in partnership with Slashdot Media, is your hub for >>>> all >>>> things parallel software development, from weekly thought leadership blogs >>>> to >>>> news, videos, case studies, tutorials and more. Take a look and join the >>>> conversation now.http://goparallel.sourceforge.net/ >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> Hi, >>> >>> I started working on styles based on which support the figure is designed >>> for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). >>> >>> For those, in a style point of view, I think only the text size should be >>> modified (got it done, just need to get the proper sizes for each style), >>> which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we >>> don't mess with any style we could apply using Cascading styles. >>> >>> Also, I was thinking that I should set the export settings for each of those >>> styles, but also get an export style folder (with a few good parameters). >>> This would mean no more need to adjust dpi, file format, figure size... >>> >>> Finally, I could add a folder for specific papers, in which the figure >>> parameters would be tweaked so that we can directly be in a specific paper >>> format. I guess it would take into account both text size and export >>> parameters for each paper. >>> >>> Let me know what you think about it. >>> >>> Marin Gilles >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming The Go Parallel Website, >>> sponsored >>> by Intel and developed in partnership with Slashdot Media, is your hub for >>> all >>> things parallel software development, from weekly thought leadership blogs >>> to >>> news, videos, case studies, tutorials and more. Take a look and join the >>> conversation now.http://goparallel.sourceforge.net/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> > That would indeed would be nice, and get us started. > I created a repository > <https://github.com/mrngilles/matplotlib-styles>, if anyone wants to > contribute. Don’t hesitate to bring in some new ideas. > > Marin Gilles > > Hello everyone, After working a bit on the styles, I noticed that some parameters could not be modified using an rc or style file (for example, turning off the right, left, up or down axis). I kind of saw how to do it using the |Axis.spine.set_visible()| method, but it would be better to be able to change it in the rc. So I was wondering if there would be a way to add rcParameters using a method with an external file, or if I would have to change this in the mpl source? Maybe a method that would add rcParameters on demand... Thanks -- *Marin GILLES* /PhD student CNRS / /Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) UMR 6303 CNRS - Université de Bourgogne 9 av Alain Savary, BP 47870 21078, Dijon (France) / ☎ (+33)6.79.35.30.11 ✉ mar...@u-... <mailto:mar...@u-...>
The bar plot options allow you to set align='center' or align='edge' But when it aligns on the edge, it always does left align. I can't find any documentation that allows me to align it as a right align. Is this possible?
Actually, both syntax are valid. I think the problem in you svg parser is that you're changing the reference point each time you iterate in points. For example consider the path: m 100,200 c 100,100 400,100 400,200 z => (m P0 c P1 P2 P3 z) Your parser ended with vertex at (100.0, -200.0), (200.0, -300.0), (600.0, -400.0), (1000.0, -600.0) which corresponds to [P0, P0+P1, P1+P2, P2+P3] but you want [P0, P0+P1, P0+P2, P0+P3] Nicolas > On 05 Mar 2015, at 00:35, Jason Moore <moo...@gm...> wrote: > > Actually the notation I have is valid SVG path data. Your script could be modified to handle the more general forms, see: > > http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation > > But this still doesn't answer why the smoothness is different between the SVG and matploblib paths. I haven't been able to figure that out yet. > > > Jason > moorepants.info > +01 530-601-9791 > > On Wed, Mar 4, 2015 at 2:32 PM, Jason Moore <moo...@gm...> wrote: > Thanks Nicolas for your code. > > The difference in what I have and what you share is in the svg path specification. For some reason Inkscape outputs a single leading "c" for the bezier curve in my path whereas your path has a "c" for every three points. I'm not quite sure the difference, maybe Inkscape outputs a non-standard form. > > > Jason > moorepants.info > +01 530-601-9791 > > On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier <Nic...@in...> wrote: > > Here is a (limited) SVG path parser I made some time ago: > > https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py > > > The svg_parse function might just do what you're trying to achieve. > > > Nicolas > > > On 04 Mar 2015, at 20:51, Jason Moore <moo...@gm...> wrote: > > > > Hi, > > > > I have some SVGs with closed Bezier curve paths that I'd like to convert to matplotlib paths. > > > > For example, here is some code: https://gist.github.com/moorepants/4cac02e798446bb46de7 > > > > The above script runs but the resulting path in matplotlib is less smooth that when opened in inkscape, for example. I've attached screenshots. > > > > I'm not sure why there is a difference. > > > > Any suggestions to get my matplotlib curves looking as smooth as they do in SVG format? > > > > Jason > > moorepants.info > > +01 530-601-9791 > > <Selection_057.png><Selection_058.png>------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > > by Intel and developed in partnership with Slashdot Media, is your hub for all > > things parallel software development, from weekly thought leadership blogs to > > news, videos, case studies, tutorials and more. Take a look and join the > > conversation now. http://goparallel.sourceforge.net/_______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > >
Nertskull, If no one responds, you might repost with some examples of what you’ve tried. I would suggest xticks and company, but I’m not sure if it works in your situation. -Sterling On Mar 4, 2015, at 6:20PM, Nertskull <ner...@gm...> wrote: > I've searched and can't figure this out. > > And I'm not sure exactly the best way to do it. > > Basically, I'm trying to make a bar graph, and I have about 400 bars (so > 400 x-axis 'groups'). > > When I plot it, I get every bar labelled, but that is too much to be > seen. How do I make it so I only label every 10th bar, or every 50th bar? > > The data is ordered data, so it doesn't matter if many don't have a label. > > Thanks. > > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for all > things parallel software development, from weekly thought leadership blogs to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
I've searched and can't figure this out. And I'm not sure exactly the best way to do it. Basically, I'm trying to make a bar graph, and I have about 400 bars (so 400 x-axis 'groups'). When I plot it, I get every bar labelled, but that is too much to be seen. How do I make it so I only label every 10th bar, or every 50th bar? The data is ordered data, so it doesn't matter if many don't have a label. Thanks.
Le 04/03/2015 23:48, Thomas Caswell a écrit : > That repo should probably be folded together with Tony Yu's style > gallery code and eventually be migrated to live under the main > matplotlib organization. > > I would also advocate for adding a bit of code into that repo to make > it importable and to register all/some of it's style files with the > USER_LIBRARY_PATHS attribute in mpl.style.core so that these things > 'just work' by name if you import `mpl_styles` (ex > `style.use('journals.pre')` would enable the styles for Physical > Review E). > > Tom > > (ps sorry if this goes out twice, browser was being flaky) > > On Wed, Mar 4, 2015 at 5:31 PM Marin GILLES <mrn...@gm... > <mailto:mrn...@gm...>> wrote: > > Le 04/03/2015 22:46, Yuxiang Wang a écrit : > >> Hi Marin, >> >> +1 for the idea of specific papers. For example, all PLOS require the >> same figure format and I have my own config file. I'd be more than >> happy to dig into it and try my best to contribute. >> >> Shawn >> >> On Wed, Mar 4, 2015 at 4:27 PM, Marin GILLES<mrn...@gm...> <mailto:mrn...@gm...> wrote: >>> Le 04/03/2015 06:21, Tony Yu a écrit : >>> >>> On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever<gok...@gm...> <mailto:gok...@gm...> wrote: >>>> I see seaborn has "paper, notebook, talk, and poster" options. >>>> http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html <http://stanford.edu/%7Emwaskom/software/seaborn-dev/aesthetics.html> >>>> Apperantly he scales each parameter to get modified views. This would be a >>>> good addition for any of the styles available in matplotlib. >>> A similar pattern with `matplotlib.style` would use chained stylesheets. The >>> idea would be to make stylesheets either aesthetics focused or layout >>> focused. By aesthetics, I mean things like colors and marker shape, and by >>> layout, I mean things like default figure size, figure padding, font size, >>> etc. Then you can easily have a style that defines the general aesthetics >>> and easily modify it for papers, talks, etc. >>> >>> Here's an example from `mpltools`, but the same syntax applies to the >>> `style` module in `matplotlib`: >>> >>> http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html >>> >>> (PoF = Physics of Fluids journal; IIRC I think I have some personal >>> stylesheets that take the normal two-column figure layout and convert it to >>> a full-page layout.) >>> >>> -Tony >>> >>>> On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES<mrn...@gm...> <mailto:mrn...@gm...> wrote: >>>>> Le 03/03/2015 18:15, Gökhan Sever a écrit : >>>>> >>>>> >>>>> >>>>> On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES<mrn...@gm...> <mailto:mrn...@gm...> >>>>> wrote: >>>>>> Sure, I'll be careful about that. >>>>>> I'm going to go try and design some new interesting ones. >>>>>> Maybe adding some styles specific to some plot types could be useful. >>>>>> Also some styles specific for some applications (geoscience, biology)? >>>>>> If you have any other ideas, please let me know. >>>>>> >>>>>> -- >>>>>> Marin GILLES >>>>> It would be good to have styles for "paper" and "presentation" modes. The >>>>> former would have smaller ticks, labels, linewidths, other axis elements >>>>> that goes into a journal publication, while the latter with much magnified >>>>> elements to be clearly visible on a screen from the back of a room. >>>>> >>>>> Indeed it would be a very good idea. >>>>> I've seen that already in the seaborn lib I guess. >>>>> >>>>> -- >>>>> Marin GILLES >>>>> PhD student CNRS >>>>> Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) >>>>> UMR 6303 CNRS - Université de Bourgogne >>>>> 9 av Alain Savary, BP 47870 >>>>> 21078, Dijon (France) >>>>> ☎ (+33)6.79.35.30.11 >>>>> ✉mar...@u-... <mailto:mar...@u-...> >>>> -- >>>> Gökhan >>>> >>>> >>>> ------------------------------------------------------------------------------ >>>> Dive into the World of Parallel Programming The Go Parallel Website, >>>> sponsored >>>> by Intel and developed in partnership with Slashdot Media, is your hub for >>>> all >>>> things parallel software development, from weekly thought leadership blogs >>>> to >>>> news, videos, case studies, tutorials and more. Take a look and join the >>>> conversation now.http://goparallel.sourceforge.net/ >>>> _______________________________________________ >>>> Matplotlib-users mailing list >>>> Mat...@li... <mailto:Mat...@li...> >>>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>>> >>> Hi, >>> >>> I started working on styles based on which support the figure is designed >>> for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). >>> >>> For those, in a style point of view, I think only the text size should be >>> modified (got it done, just need to get the proper sizes for each style), >>> which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we >>> don't mess with any style we could apply using Cascading styles. >>> >>> Also, I was thinking that I should set the export settings for each of those >>> styles, but also get an export style folder (with a few good parameters). >>> This would mean no more need to adjust dpi, file format, figure size... >>> >>> Finally, I could add a folder for specific papers, in which the figure >>> parameters would be tweaked so that we can directly be in a specific paper >>> format. I guess it would take into account both text size and export >>> parameters for each paper. >>> >>> Let me know what you think about it. >>> >>> Marin Gilles >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming The Go Parallel Website, >>> sponsored >>> by Intel and developed in partnership with Slashdot Media, is your hub for >>> all >>> things parallel software development, from weekly thought leadership blogs >>> to >>> news, videos, case studies, tutorials and more. Take a look and join the >>> conversation now.http://goparallel.sourceforge.net/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... <mailto:Mat...@li...> >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> > That would indeed would be nice, and get us started. > I created a repository > <https://github.com/mrngilles/matplotlib-styles>, if anyone wants > to contribute. Don’t hesitate to bring in some new ideas. > > Marin Gilles > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel > Website, sponsored > by Intel and developed in partnership with Slashdot Media, is your > hub for all > things parallel software development, from weekly thought > leadership blogs to > news, videos, case studies, tutorials and more. Take a look and > join the > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > Matplotlib-users mailing list > Mat...@li... > <mailto:Mat...@li...> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > I indeed planned on making examples for every available style. Tony Yu's style gallery seems indeed quite interesting, I'll take a look. I also planned to register it into USER_LIBRARY_PATHS to import it directly. You shouldn't have to import an other plugin if you wish to use a matplotlib built-in style... You also talked about migrating to the main mpl organization. How exactly would that work? Thanks Marin
Actually the notation I have is valid SVG path data. Your script could be modified to handle the more general forms, see: http://www.w3.org/TR/SVG/paths.html#PathDataGeneralInformation But this still doesn't answer why the smoothness is different between the SVG and matploblib paths. I haven't been able to figure that out yet. Jason moorepants.info +01 530-601-9791 On Wed, Mar 4, 2015 at 2:32 PM, Jason Moore <moo...@gm...> wrote: > Thanks Nicolas for your code. > > The difference in what I have and what you share is in the svg path > specification. For some reason Inkscape outputs a single leading "c" for > the bezier curve in my path whereas your path has a "c" for every three > points. I'm not quite sure the difference, maybe Inkscape outputs a > non-standard form. > > > Jason > moorepants.info > +01 530-601-9791 > > On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier < > Nic...@in...> wrote: > >> >> Here is a (limited) SVG path parser I made some time ago: >> >> >> https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py >> >> >> The svg_parse function might just do what you're trying to achieve. >> >> >> Nicolas >> >> > On 04 Mar 2015, at 20:51, Jason Moore <moo...@gm...> wrote: >> > >> > Hi, >> > >> > I have some SVGs with closed Bezier curve paths that I'd like to >> convert to matplotlib paths. >> > >> > For example, here is some code: >> https://gist.github.com/moorepants/4cac02e798446bb46de7 >> > >> > The above script runs but the resulting path in matplotlib is less >> smooth that when opened in inkscape, for example. I've attached screenshots. >> > >> > I'm not sure why there is a difference. >> > >> > Any suggestions to get my matplotlib curves looking as smooth as they >> do in SVG format? >> > >> > Jason >> > moorepants.info >> > +01 530-601-9791 >> > >> <Selection_057.png><Selection_058.png>------------------------------------------------------------------------------ >> > Dive into the World of Parallel Programming The Go Parallel Website, >> sponsored >> > by Intel and developed in partnership with Slashdot Media, is your hub >> for all >> > things parallel software development, from weekly thought leadership >> blogs to >> > news, videos, case studies, tutorials and more. Take a look and join the >> > conversation now. >> http://goparallel.sourceforge.net/_______________________________________________ >> > Matplotlib-users mailing list >> > Mat...@li... >> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> >> >
That repo should probably be folded together with Tony Yu's style gallery code and eventually be migrated to live under the main matplotlib organization. I would also advocate for adding a bit of code into that repo to make it importable and to register all/some of it's style files with the USER_LIBRARY_PATHS attribute in mpl.style.core so that these things 'just work' by name if you import `mpl_styles` (ex `style.use('journals.pre')` would enable the styles for Physical Review E). Tom (ps sorry if this goes out twice, browser was being flaky) On Wed, Mar 4, 2015 at 5:31 PM Marin GILLES <mrn...@gm...> wrote: > Le 04/03/2015 22:46, Yuxiang Wang a écrit : > > Hi Marin, > > +1 for the idea of specific papers. For example, all PLOS require the > same figure format and I have my own config file. I'd be more than > happy to dig into it and try my best to contribute. > > Shawn > > On Wed, Mar 4, 2015 at 4:27 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> wrote: > > Le 04/03/2015 06:21, Tony Yu a écrit : > > On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever <gok...@gm...> <gok...@gm...> wrote: > > I see seaborn has "paper, notebook, talk, and poster" options.http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html > Apperantly he scales each parameter to get modified views. This would be a > good addition for any of the styles available in matplotlib. > > A similar pattern with `matplotlib.style` would use chained stylesheets. The > idea would be to make stylesheets either aesthetics focused or layout > focused. By aesthetics, I mean things like colors and marker shape, and by > layout, I mean things like default figure size, figure padding, font size, > etc. Then you can easily have a style that defines the general aesthetics > and easily modify it for papers, talks, etc. > > Here's an example from `mpltools`, but the same syntax applies to the > `style` module in `matplotlib`: > http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html > > (PoF = Physics of Fluids journal; IIRC I think I have some personal > stylesheets that take the normal two-column figure layout and convert it to > a full-page layout.) > > -Tony > > > On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> wrote: > > Le 03/03/2015 18:15, Gökhan Sever a écrit : > > > > On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES <mrn...@gm...> <mrn...@gm...> > wrote: > > Sure, I'll be careful about that. > I'm going to go try and design some new interesting ones. > Maybe adding some styles specific to some plot types could be useful. > Also some styles specific for some applications (geoscience, biology)? > If you have any other ideas, please let me know. > > -- > Marin GILLES > > It would be good to have styles for "paper" and "presentation" modes. The > former would have smaller ticks, labels, linewidths, other axis elements > that goes into a journal publication, while the latter with much magnified > elements to be clearly visible on a screen from the back of a room. > > Indeed it would be a very good idea. > I've seen that already in the seaborn lib I guess. > > -- > Marin GILLES > PhD student CNRS > Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) > UMR 6303 CNRS - Université de Bourgogne > 9 av Alain Savary, BP 47870 > 21078, Dijon (France) > ☎ (+33)6.79.35.30.11 > ✉ mar...@u-... > > -- > Gökhan > > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > Hi, > > I started working on styles based on which support the figure is designed > for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). > > For those, in a style point of view, I think only the text size should be > modified (got it done, just need to get the proper sizes for each style), > which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we > don't mess with any style we could apply using Cascading styles. > > Also, I was thinking that I should set the export settings for each of those > styles, but also get an export style folder (with a few good parameters). > This would mean no more need to adjust dpi, file format, figure size... > > Finally, I could add a folder for specific papers, in which the figure > parameters would be tweaked so that we can directly be in a specific paper > format. I guess it would take into account both text size and export > parameters for each paper. > > Let me know what you think about it. > > Marin Gilles > > ------------------------------------------------------------------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > That would indeed would be nice, and get us started. > I created a repository <https://github.com/mrngilles/matplotlib-styles>, > if anyone wants to contribute. Don’t hesitate to bring in some new ideas. > > Marin Gilles > > ------------------------------------------------------------ > ------------------ > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > by Intel and developed in partnership with Slashdot Media, is your hub for > all > things parallel software development, from weekly thought leadership blogs > to > news, videos, case studies, tutorials and more. Take a look and join the > conversation now. http://goparallel.sourceforge.net/ > _______________________________________________ > Matplotlib-users mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-users >
Thanks Nicolas for your code. The difference in what I have and what you share is in the svg path specification. For some reason Inkscape outputs a single leading "c" for the bezier curve in my path whereas your path has a "c" for every three points. I'm not quite sure the difference, maybe Inkscape outputs a non-standard form. Jason moorepants.info +01 530-601-9791 On Wed, Mar 4, 2015 at 1:53 PM, Nicolas P. Rougier <Nic...@in... > wrote: > > Here is a (limited) SVG path parser I made some time ago: > > > https://github.com/rougier/LinuxMag-HS-2014/blob/master/matplotlib/firefox.py > > > The svg_parse function might just do what you're trying to achieve. > > > Nicolas > > > On 04 Mar 2015, at 20:51, Jason Moore <moo...@gm...> wrote: > > > > Hi, > > > > I have some SVGs with closed Bezier curve paths that I'd like to convert > to matplotlib paths. > > > > For example, here is some code: > https://gist.github.com/moorepants/4cac02e798446bb46de7 > > > > The above script runs but the resulting path in matplotlib is less > smooth that when opened in inkscape, for example. I've attached screenshots. > > > > I'm not sure why there is a difference. > > > > Any suggestions to get my matplotlib curves looking as smooth as they do > in SVG format? > > > > Jason > > moorepants.info > > +01 530-601-9791 > > > <Selection_057.png><Selection_058.png>------------------------------------------------------------------------------ > > Dive into the World of Parallel Programming The Go Parallel Website, > sponsored > > by Intel and developed in partnership with Slashdot Media, is your hub > for all > > things parallel software development, from weekly thought leadership > blogs to > > news, videos, case studies, tutorials and more. Take a look and join the > > conversation now. > http://goparallel.sourceforge.net/_______________________________________________ > > Matplotlib-users mailing list > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > >
Le 04/03/2015 22:46, Yuxiang Wang a écrit : > Hi Marin, > > +1 for the idea of specific papers. For example, all PLOS require the > same figure format and I have my own config file. I'd be more than > happy to dig into it and try my best to contribute. > > Shawn > > On Wed, Mar 4, 2015 at 4:27 PM, Marin GILLES <mrn...@gm...> wrote: >> Le 04/03/2015 06:21, Tony Yu a écrit : >> >> On Tue, Mar 3, 2015 at 11:50 AM, Gökhan Sever <gok...@gm...> wrote: >>> I see seaborn has "paper, notebook, talk, and poster" options. >>> http://stanford.edu/~mwaskom/software/seaborn-dev/aesthetics.html >>> Apperantly he scales each parameter to get modified views. This would be a >>> good addition for any of the styles available in matplotlib. >> A similar pattern with `matplotlib.style` would use chained stylesheets. The >> idea would be to make stylesheets either aesthetics focused or layout >> focused. By aesthetics, I mean things like colors and marker shape, and by >> layout, I mean things like default figure size, figure padding, font size, >> etc. Then you can easily have a style that defines the general aesthetics >> and easily modify it for papers, talks, etc. >> >> Here's an example from `mpltools`, but the same syntax applies to the >> `style` module in `matplotlib`: >> >> http://tonysyu.github.io/mpltools/auto_examples/style/plot_multiple_styles.html >> >> (PoF = Physics of Fluids journal; IIRC I think I have some personal >> stylesheets that take the normal two-column figure layout and convert it to >> a full-page layout.) >> >> -Tony >> >>> On Tue, Mar 3, 2015 at 12:35 PM, Marin GILLES <mrn...@gm...> wrote: >>>> Le 03/03/2015 18:15, Gökhan Sever a écrit : >>>> >>>> >>>> >>>> On Tue, Mar 3, 2015 at 12:07 PM, Marin GILLES <mrn...@gm...> >>>> wrote: >>>>> Sure, I'll be careful about that. >>>>> I'm going to go try and design some new interesting ones. >>>>> Maybe adding some styles specific to some plot types could be useful. >>>>> Also some styles specific for some applications (geoscience, biology)? >>>>> If you have any other ideas, please let me know. >>>>> >>>>> -- >>>>> Marin GILLES >>>> It would be good to have styles for "paper" and "presentation" modes. The >>>> former would have smaller ticks, labels, linewidths, other axis elements >>>> that goes into a journal publication, while the latter with much magnified >>>> elements to be clearly visible on a screen from the back of a room. >>>> >>>> Indeed it would be a very good idea. >>>> I've seen that already in the seaborn lib I guess. >>>> >>>> -- >>>> Marin GILLES >>>> PhD student CNRS >>>> Laboratoire Interdisciplinaire Carnot de Bourgogne (ICB) >>>> UMR 6303 CNRS - Université de Bourgogne >>>> 9 av Alain Savary, BP 47870 >>>> 21078, Dijon (France) >>>> ☎ (+33)6.79.35.30.11 >>>> ✉ mar...@u-... >>> >>> >>> -- >>> Gökhan >>> >>> >>> ------------------------------------------------------------------------------ >>> Dive into the World of Parallel Programming The Go Parallel Website, >>> sponsored >>> by Intel and developed in partnership with Slashdot Media, is your hub for >>> all >>> things parallel software development, from weekly thought leadership blogs >>> to >>> news, videos, case studies, tutorials and more. Take a look and join the >>> conversation now. http://goparallel.sourceforge.net/ >>> _______________________________________________ >>> Matplotlib-users mailing list >>> Mat...@li... >>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >>> >> Hi, >> >> I started working on styles based on which support the figure is designed >> for (as of now, I've got 'paper', 'notebook', 'talk', 'poster'). >> >> For those, in a style point of view, I think only the text size should be >> modified (got it done, just need to get the proper sizes for each style), >> which is unlike the 'seaborn' way of doing it. Thing is, by doing so, we >> don't mess with any style we could apply using Cascading styles. >> >> Also, I was thinking that I should set the export settings for each of those >> styles, but also get an export style folder (with a few good parameters). >> This would mean no more need to adjust dpi, file format, figure size... >> >> Finally, I could add a folder for specific papers, in which the figure >> parameters would be tweaked so that we can directly be in a specific paper >> format. I guess it would take into account both text size and export >> parameters for each paper. >> >> Let me know what you think about it. >> >> Marin Gilles >> >> ------------------------------------------------------------------------------ >> Dive into the World of Parallel Programming The Go Parallel Website, >> sponsored >> by Intel and developed in partnership with Slashdot Media, is your hub for >> all >> things parallel software development, from weekly thought leadership blogs >> to >> news, videos, case studies, tutorials and more. Take a look and join the >> conversation now. http://goparallel.sourceforge.net/ >> _______________________________________________ >> Matplotlib-users mailing list >> Mat...@li... >> https://lists.sourceforge.net/lists/listinfo/matplotlib-users >> > That would indeed would be nice, and get us started. I created a repository <https://github.com/mrngilles/matplotlib-styles>, if anyone wants to contribute. Don’t hesitate to bring in some new ideas. Marin Gilles