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
|
From: Ryan N. <rne...@gm...> - 2015-03-14 02:52:35
|
Okay. I figured out the problem. You need to pass a dictionary to the config magic. Here is the relevant code: %config InlineBackend.print_figure_kwargs = {'bbox_inches':None} I created a PR with IPython (https://github.com/ipython/ipython/pull/8051) to add this information to the %matplotlib documentation, so this doesn't cause confusion for others. Thanks to all the IPython and MPL devs for these great tools! On Fri, Mar 13, 2015 at 7:07 PM, Wes Turner <wes...@gm...> wrote: > Ryan, > > > http://wrdrd.github.io/docs/consulting/data-science.html#data-visualization-tools > On Mar 13, 2015 1:59 PM, "Ryan Nelson" <rne...@gm...> wrote: > >> I'm constructing a multi-plot figure using an IPython notebook (v3) and >> matplotlib (v1.4.3) inline magic. I was manually setting the axes bounds, >> and I ended up with something like the following: >> >> ######## >> import matplotlib.pyplot as plt >> %matplotlib inline >> >> bottom = 0.12 >> top = 0.9 >> left = 0.12 >> axwidth = (1-(left*2))/3 >> >> fig = plt.figure(figsize=(10,4)) >> >> ax1 = fig.add_axes((left, bottom, axwidth, top)) >> ax1.set_title('Title') >> #ax1.tick_params(labelleft=False) >> >> ax2 = fig.add_axes((left+axwidth, bottom, axwidth, top), >> sharex=ax1, sharey=ax1) >> ax2.tick_params(labelleft=False) >> >> ax3 = fig.add_axes((left+axwidth*2, bottom, axwidth, top), >> sharex=ax1, sharey=ax1) >> ax3.tick_params(labelleft=False) >> >> fig.savefig('junk.pdf', format='pdf') >> fig.savefig('junk2.png') >> ####### >> >> Obviously, the bottom+top that I've selected is >1, so the axes should go >> off the top of the figure. (Stupid, I know...) The axes in both the PDF and >> PNG formatted files are clipped by the top of the figure as you would >> expect; however, the figure that is displayed in the Notebook looks just >> fine. In addition, if you add a title to one of the axes, the figure in >> IPython suddenly creates more space for the text. Maybe it is rearranging >> the axes information behind the scenes? >> >> I'm curious why this design decision was made. I would say this is a bug. >> Now that I know about this behavior, I can easily fix it. But new users >> will be baffled when their saved figure looks nothing like the displayed >> figure in the notebook. >> >> Ryan >> >> _______________________________________________ >> IPython-dev mailing list >> IPy...@sc... >> http://mail.scipy.org/mailman/listinfo/ipython-dev >> >> > _______________________________________________ > IPython-dev mailing list > IPy...@sc... > http://mail.scipy.org/mailman/listinfo/ipython-dev > > |
From: Ryan N. <rne...@gm...> - 2015-03-13 23:00:48
|
Thanks Tom. Your hint led me to the following page: https://github.com/ipython/ipython/blob/aab20bf85126f5b1da857193c446aebe6346acec/docs/source/whatsnew/version2.0.rst#other-changes So it seems that this change is quite old, and I never noticed it before... The suggestion on that page requires some incantation of the %config magic. I tried this: %config InlineBackend.print_figure_kwargs.bbox_inches = None Which silently passes, but doesn't change the behavior. Your rational for IPython's use of this kwarg by default is sound, and I understand that there are valid use cases for it in some circumstances. However, I still think this is problematic. I like MPL because you can make a plot to your exact specifications -- but setting this kind of behavior by default (without a well documented fix) feels a little "Microsoft Office"-y... That being said, I really don't care all that much. IPython is a fantastic tool. I'll just move my plotting code to a separate script and tweak things there. (But then I won't be able to share the notebook with my fancy plot embedded except as an external image. Can't have everything.) I actually don't want any sort of 'tight' layout; however, just for reference, the `tight_layout` function throws an error in my example. Ryan On Fri, Mar 13, 2015 at 4:03 PM, Thomas Caswell <tca...@gm...> wrote: > This is due to the fact that by default the inline backend saves the pngs > using `boundingbox_inches='tight'`. The design goal on the mpl side of > this kwargs was to trim off extra whitespace, but the way it is implemented > works just as effectively to expand to fit artists that fall outside of the > figure. I assume the choice to make this the default in inline was to > waste as little space as possible. > > A possibly more reliable method to get the same effect is to use > `tight_layout` (see http://matplotlib.org/users/tight_layout_guide.html) > > There was talk of replacing that implementation with a linear constraint > solver, but not much progress has been made in that direction (see > https://github.com/matplotlib/matplotlib/issues/1109) > > Tom > > On Fri, Mar 13, 2015 at 3:01 PM Ryan Nelson <rne...@gm...> wrote: > >> I'm constructing a multi-plot figure using an IPython notebook (v3) and >> matplotlib (v1.4.3) inline magic. I was manually setting the axes bounds, >> and I ended up with something like the following: >> >> ######## >> import matplotlib.pyplot as plt >> %matplotlib inline >> >> bottom = 0.12 >> top = 0.9 >> left = 0.12 >> axwidth = (1-(left*2))/3 >> >> fig = plt.figure(figsize=(10,4)) >> >> ax1 = fig.add_axes((left, bottom, axwidth, top)) >> ax1.set_title('Title') >> #ax1.tick_params(labelleft=False) >> >> ax2 = fig.add_axes((left+axwidth, bottom, axwidth, top), >> sharex=ax1, sharey=ax1) >> ax2.tick_params(labelleft=False) >> >> ax3 = fig.add_axes((left+axwidth*2, bottom, axwidth, top), >> sharex=ax1, sharey=ax1) >> ax3.tick_params(labelleft=False) >> >> fig.savefig('junk.pdf', format='pdf') >> fig.savefig('junk2.png') >> ####### >> >> Obviously, the bottom+top that I've selected is >1, so the axes should go >> off the top of the figure. (Stupid, I know...) The axes in both the PDF and >> PNG formatted files are clipped by the top of the figure as you would >> expect; however, the figure that is displayed in the Notebook looks just >> fine. In addition, if you add a title to one of the axes, the figure in >> IPython suddenly creates more space for the text. Maybe it is rearranging >> the axes information behind the scenes? >> >> I'm curious why this design decision was made. I would say this is a bug. >> Now that I know about this behavior, I can easily fix it. But new users >> will be baffled when their saved figure looks nothing like the displayed >> figure in the notebook. >> >> Ryan >> ------------------------------------------------------------ >> ------------------ >> 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 >> > |
From: Thomas C. <tca...@gm...> - 2015-03-13 20:03:38
|
This is due to the fact that by default the inline backend saves the pngs using `boundingbox_inches='tight'`. The design goal on the mpl side of this kwargs was to trim off extra whitespace, but the way it is implemented works just as effectively to expand to fit artists that fall outside of the figure. I assume the choice to make this the default in inline was to waste as little space as possible. A possibly more reliable method to get the same effect is to use `tight_layout` (see http://matplotlib.org/users/tight_layout_guide.html) There was talk of replacing that implementation with a linear constraint solver, but not much progress has been made in that direction (see https://github.com/matplotlib/matplotlib/issues/1109) Tom On Fri, Mar 13, 2015 at 3:01 PM Ryan Nelson <rne...@gm...> wrote: > I'm constructing a multi-plot figure using an IPython notebook (v3) and > matplotlib (v1.4.3) inline magic. I was manually setting the axes bounds, > and I ended up with something like the following: > > ######## > import matplotlib.pyplot as plt > %matplotlib inline > > bottom = 0.12 > top = 0.9 > left = 0.12 > axwidth = (1-(left*2))/3 > > fig = plt.figure(figsize=(10,4)) > > ax1 = fig.add_axes((left, bottom, axwidth, top)) > ax1.set_title('Title') > #ax1.tick_params(labelleft=False) > > ax2 = fig.add_axes((left+axwidth, bottom, axwidth, top), > sharex=ax1, sharey=ax1) > ax2.tick_params(labelleft=False) > > ax3 = fig.add_axes((left+axwidth*2, bottom, axwidth, top), > sharex=ax1, sharey=ax1) > ax3.tick_params(labelleft=False) > > fig.savefig('junk.pdf', format='pdf') > fig.savefig('junk2.png') > ####### > > Obviously, the bottom+top that I've selected is >1, so the axes should go > off the top of the figure. (Stupid, I know...) The axes in both the PDF and > PNG formatted files are clipped by the top of the figure as you would > expect; however, the figure that is displayed in the Notebook looks just > fine. In addition, if you add a title to one of the axes, the figure in > IPython suddenly creates more space for the text. Maybe it is rearranging > the axes information behind the scenes? > > I'm curious why this design decision was made. I would say this is a bug. > Now that I know about this behavior, I can easily fix it. But new users > will be baffled when their saved figure looks nothing like the displayed > figure in the notebook. > > Ryan > ------------------------------------------------------------ > ------------------ > 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 > |
From: Adam H. <hug...@gm...> - 2015-03-13 19:06:27
|
All the pandas plots that I've used take an axes keyword so try: c = corrplot.Corrplot(df, ax=ax1) or c = corrplot.Corrplot(df, axes=ax1) Do either of those work? On Fri, Mar 13, 2015 at 2:04 PM, Paul Hobson <pmh...@gm...> wrote: > What's the function signature of corrplot.CorrPlot? Hopefully you can pass > an Axes object to it argument. > -p > > On Fri, Mar 13, 2015 at 9:02 AM, Sudheer Joseph <sud...@ya...> > wrote: > >> Dear Matplotlib exprets, >> I am trying to place the corrplot in subplot environment. But not able to >> figure out how to do it properly. Can any one advice please? >> >> >> from biokit.viz import corrplot >> df = pd.DataFrame(dict(( (k, np.random.random(10)+ord(k)-65) for k in >> letters))) >> df = df.corr() >> c = corrplot.Corrplot(df) >> >> I wanted to make the corrplot in below 4 boxes which can come out as a >> single figure. The above data is a test data actually I wanted use seasonal >> data for this purpose. >> >> fig = plt.figure() >> fig.subplots_adjust(left=0.2, wspace=0.6) >> ax1 = fig.add_subplot(221) >> ax2 = fig.add_subplot(222) >> ax3 = fig.add_subplot(223) >> ax4 = fig.add_subplot(224) >> >> >> *************************************************************** >> Sudheer Joseph >> Indian National Centre for Ocean Information Services >> Ministry of Earth Sciences, Govt. of India >> POST BOX NO: 21, IDA Jeedeemetla P.O. >> Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 >> Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), >> Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) >> E-mail:sjo...@gm...;sud...@ya... >> Web- http://oppamthadathil.tripod.com >> *************************************************************** >> >> >> ------------------------------------------------------------------------------ >> 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 >> > > > > ------------------------------------------------------------------------------ > 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 > > |
From: Ryan N. <rne...@gm...> - 2015-03-13 18:59:36
|
I'm constructing a multi-plot figure using an IPython notebook (v3) and matplotlib (v1.4.3) inline magic. I was manually setting the axes bounds, and I ended up with something like the following: ######## import matplotlib.pyplot as plt %matplotlib inline bottom = 0.12 top = 0.9 left = 0.12 axwidth = (1-(left*2))/3 fig = plt.figure(figsize=(10,4)) ax1 = fig.add_axes((left, bottom, axwidth, top)) ax1.set_title('Title') #ax1.tick_params(labelleft=False) ax2 = fig.add_axes((left+axwidth, bottom, axwidth, top), sharex=ax1, sharey=ax1) ax2.tick_params(labelleft=False) ax3 = fig.add_axes((left+axwidth*2, bottom, axwidth, top), sharex=ax1, sharey=ax1) ax3.tick_params(labelleft=False) fig.savefig('junk.pdf', format='pdf') fig.savefig('junk2.png') ####### Obviously, the bottom+top that I've selected is >1, so the axes should go off the top of the figure. (Stupid, I know...) The axes in both the PDF and PNG formatted files are clipped by the top of the figure as you would expect; however, the figure that is displayed in the Notebook looks just fine. In addition, if you add a title to one of the axes, the figure in IPython suddenly creates more space for the text. Maybe it is rearranging the axes information behind the scenes? I'm curious why this design decision was made. I would say this is a bug. Now that I know about this behavior, I can easily fix it. But new users will be baffled when their saved figure looks nothing like the displayed figure in the notebook. Ryan |
From: Paul H. <pmh...@gm...> - 2015-03-13 18:04:26
|
What's the function signature of corrplot.CorrPlot? Hopefully you can pass an Axes object to it argument. -p On Fri, Mar 13, 2015 at 9:02 AM, Sudheer Joseph <sud...@ya...> wrote: > Dear Matplotlib exprets, > I am trying to place the corrplot in subplot environment. But not able to > figure out how to do it properly. Can any one advice please? > > > from biokit.viz import corrplot > df = pd.DataFrame(dict(( (k, np.random.random(10)+ord(k)-65) for k in > letters))) > df = df.corr() > c = corrplot.Corrplot(df) > > I wanted to make the corrplot in below 4 boxes which can come out as a > single figure. The above data is a test data actually I wanted use seasonal > data for this purpose. > > fig = plt.figure() > fig.subplots_adjust(left=0.2, wspace=0.6) > ax1 = fig.add_subplot(221) > ax2 = fig.add_subplot(222) > ax3 = fig.add_subplot(223) > ax4 = fig.add_subplot(224) > > > *************************************************************** > Sudheer Joseph > Indian National Centre for Ocean Information Services > Ministry of Earth Sciences, Govt. of India > POST BOX NO: 21, IDA Jeedeemetla P.O. > Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 > Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), > Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) > E-mail:sjo...@gm...;sud...@ya... > Web- http://oppamthadathil.tripod.com > *************************************************************** > > > ------------------------------------------------------------------------------ > 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 > |
From: Sudheer J. <sud...@ya...> - 2015-03-13 16:02:54
|
Dear Matplotlib exprets, I am trying to place the corrplot in subplot environment. But not able to figure out how to do it properly. Can any one advice please? from biokit.viz import corrplot df = pd.DataFrame(dict(( (k, np.random.random(10)+ord(k)-65) for k in letters))) df = df.corr() c = corrplot.Corrplot(df) I wanted to make the corrplot in below 4 boxes which can come out as a single figure. The above data is a test data actually I wanted use seasonal data for this purpose. fig = plt.figure() fig.subplots_adjust(left=0.2, wspace=0.6) ax1 = fig.add_subplot(221) ax2 = fig.add_subplot(222) ax3 = fig.add_subplot(223) ax4 = fig.add_subplot(224) *************************************************************** Sudheer Joseph Indian National Centre for Ocean Information Services Ministry of Earth Sciences, Govt. of India POST BOX NO: 21, IDA Jeedeemetla P.O. Via Pragathi Nagar,Kukatpally, Hyderabad; Pin:5000 55 Tel:+91-40-23886047(O),Fax:+91-40-23895011(O), Tel:+91-40-23044600(R),Tel:+91-40-9440832534(Mobile) E-mail:sjo...@gm...;sud...@ya... Web- http://oppamthadathil.tripod.com *************************************************************** |
From: Benjamin R. <ben...@ou...> - 2015-03-13 14:21:37
|
That should probably be filed as a bug report with example code. On Fri, Mar 13, 2015 at 5:53 AM, Marin GILLES <mrn...@gm...> wrote: > Le 05/03/2015 17:35, Eric Firing a écrit : > > 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 > > ------------------------------------------------------------------------------ > 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 everyone, > I am trying to make a rcParameter to choose whether to display only the x, > y or both grid orientations. The behaviour would be the same as the > axes.grid axis input parameter, which can take ‘x’, ‘y’ or ‘both’ options. > I tried adding the behaviour in the axes/_base.py file, in the grid > function. The rcParameter is actually detected, and the functions behaves > normally, but on the plotted figure, both grids are plotted… I was thinking > this could be related to the pyplot wrapper generated by the > boilerplate.py, but I really am not sure. If anyone has an idea where this > behaviour could come from… > Thank you > > -- > *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 > > |
From: Fabrice S. <si...@lm...> - 2015-03-13 12:47:35
|
Le vendredi 13 mars 2015 à 13:41 +0100, Fabrice Silva a écrit : > Le vendredi 13 mars 2015 à 10:59 +0000, Jens Nielsen a écrit : > > Which program is that screenshot from? It is likely due to a bug in that > > render. Since is displays normally in the browser. The plot lines are > > clipped behind the background but that obviously doesn't work correctly in > > that case. Not sure what can be done with in from the matplotlib side > > Seems that viewers based on librsvg (for example EOG) are not rendering > well the clip path. It is the case with your file, where a "global" clip > path (object p08fb201ce0) normally applies on the Line2D objects > ("line2d_*" objects) https://bugs.launchpad.net/ubuntu/+source/librsvg/+bug/1207538 I did not find a relative bug report upstream (in librsvg), even if several bugs relates to clip troubles. -- Fabrice Silva Laboratoire de Mécanique et d'Acoustique UPR CNRS 7051 31 Chemin Joseph Aiguier, 13402 Marseille cedex 20 (+33)4 9116 4034 - si...@lm... |
From: Fabrice S. <si...@lm...> - 2015-03-13 12:38:10
|
Le vendredi 13 mars 2015 à 10:59 +0000, Jens Nielsen a écrit : > Which program is that screenshot from? It is likely due to a bug in that > render. Since is displays normally in the browser. The plot lines are > clipped behind the background but that obviously doesn't work correctly in > that case. Not sure what can be done with in from the matplotlib side Seems that viewers based on librsvg (for example EOG) are not rendering well the clip path. It is the case with your file, where a "global" clip path (object p08fb201ce0) normally applies on the Line2D objects ("line2d_*" objects) -- Fabrice |
From: Jens N. <jen...@gm...> - 2015-03-13 10:59:48
|
Which program is that screenshot from? It is likely due to a bug in that render. Since is displays normally in the browser. The plot lines are clipped behind the background but that obviously doesn't work correctly in that case. Not sure what can be done with in from the matplotlib side best Jens fre. 13. mar. 2015 kl. 10.55 skrev liu lily <pol...@gm...>: > OK, it seems that this is due to my picture browser application. I take a > snapshot, as in the attachment. > > > > On Fri, Mar 13, 2015 at 11:51 AM, liu lily <pol...@gm...> wrote: > >> strange, it seems the pic above is normal? so I send it again >> >> On Fri, Mar 13, 2015 at 11:43 AM, liu lily <pol...@gm...> >> wrote: >> >>> Hi, all: >>> >>> I try to save a graph with svg format, but the lines crosses the >>> boundary, what is wrong with it? and how to deal with it? 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 > |
From: liu l. <pol...@gm...> - 2015-03-13 10:53:37
|
OK, it seems that this is due to my picture browser application. I take a snapshot, as in the attachment. On Fri, Mar 13, 2015 at 11:51 AM, liu lily <pol...@gm...> wrote: > strange, it seems the pic above is normal? so I send it again > > On Fri, Mar 13, 2015 at 11:43 AM, liu lily <pol...@gm...> wrote: > >> Hi, all: >> >> I try to save a graph with svg format, but the lines crosses the >> boundary, what is wrong with it? and how to deal with it? thanks! >> > > |
From: liu l. <pol...@gm...> - 2015-03-13 10:51:44
|
strange, it seems the pic above is normal? so I send it again On Fri, Mar 13, 2015 at 11:43 AM, liu lily <pol...@gm...> wrote: > Hi, all: > > I try to save a graph with svg format, but the lines crosses the > boundary, what is wrong with it? and how to deal with it? thanks! > |
From: liu l. <pol...@gm...> - 2015-03-13 10:43:57
|
Hi, all: I try to save a graph with svg format, but the lines crosses the boundary, what is wrong with it? and how to deal with it? thanks! |
From: Marin G. <mrn...@gm...> - 2015-03-13 09:53:24
|
Le 05/03/2015 17:35, Eric Firing a écrit : > 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 > > ------------------------------------------------------------------------------ > 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 everyone, I am trying to make a rcParameter to choose whether to display only the x, y or both grid orientations. The behaviour would be the same as the axes.grid axis input parameter, which can take ‘x’, ‘y’ or ‘both’ options. I tried adding the behaviour in the |axes/_base.py| file, in the grid function. The rcParameter is actually detected, and the functions behaves normally, but on the plotted figure, both grids are plotted… I was thinking this could be related to the pyplot wrapper generated by the boilerplate.py, but I really am not sure. If anyone has an idea where this behaviour could come from… Thank you -- *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-...> |
From: Dyah r. m. <dya...@gm...> - 2015-03-12 02:43:11
|
Thank you so much Jody, Eric, Arnaldo, and Joy. I will try your suggestion. Dyah On Sat, Mar 7, 2015 at 5:21 AM, Jody Klymak <jk...@uv...> wrote: > 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 > > > > ------------------------------------------------------------------------------ > 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 > -- =============================================== Dyah R Martiningrum Student at Department of Communications and Computer Engineering Graduate School of Informatics, Kyoto University RISH, Gokasho, Uji shi, Kyoto, 611-0011, Japan. Office : +81 0774 38 3856 Mobile : +81 090 6676 1981 =============================================== |
From: Ryan N. <rne...@gm...> - 2015-03-11 22:43:53
|
Sometimes a simple text file really does the trick... However, you might consider saving yourself some future pain by learning some non-text based storage formats. In the past, I used text files all the time, and they quickly became limiting, as you've noticed. I personally like HDF files. There are libraries for these files on all OSs using many programming languages. Python has at least two: PyTables and h5py. I've personally used PyTables and find it very user-friendly. Pandas also has capabilities for interacting with HDF files (via PyTables). If you are only going to be using Numpy, there are also binary formats such as .npy, .npz, and memmaps. See `numpy.save`, `numpy.savez`, and `numpy.memmap`. I don't have much experience here, so I can't say much on these formats... Good luck. Ryan On Wed, Mar 11, 2015 at 5:15 PM, Benjamin Root <ben...@ou...> wrote: > What 3D array? There shouldn't be any 3D arrays. I suspect that x_t is > only accidentally 3d by having a shape like (N, M, 1) or (1, N, M). > > Ben Root > > On Wed, Mar 11, 2015 at 5:05 PM, Prahas David Nafissian < > pra...@gm...> wrote: > >> Hello, >> >> Solved the write issue. >> >> I tried numpy savetxt but it chokes on 3D arrays. >> >> So I'm doing this: >> >> x_t.tofile('test3.txt',sep=" ",format="%f") >> >> Only issue -- no end-of-lines. But I can write a quick >> Pascal program to fix this... >> >> Once again, 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 >> > > > > ------------------------------------------------------------------------------ > 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 > > |
From: Benjamin R. <ben...@ou...> - 2015-03-11 21:16:14
|
What 3D array? There shouldn't be any 3D arrays. I suspect that x_t is only accidentally 3d by having a shape like (N, M, 1) or (1, N, M). Ben Root On Wed, Mar 11, 2015 at 5:05 PM, Prahas David Nafissian < pra...@gm...> wrote: > Hello, > > Solved the write issue. > > I tried numpy savetxt but it chokes on 3D arrays. > > So I'm doing this: > > x_t.tofile('test3.txt',sep=" ",format="%f") > > Only issue -- no end-of-lines. But I can write a quick > Pascal program to fix this... > > Once again, 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 > |
From: Prahas D. N. <pra...@gm...> - 2015-03-11 21:05:14
|
Hello, Solved the write issue. I tried numpy savetxt but it chokes on 3D arrays. So I'm doing this: x_t.tofile('test3.txt',sep=" ",format="%f") Only issue -- no end-of-lines. But I can write a quick Pascal program to fix this... Once again, thanks! |
From: Sterling S. <sm...@fu...> - 2015-03-11 16:55:40
|
Prahas, If I read it correctly, it looks like all of your x,y,z values are stored in x_t (and computed before plotting). See http://docs.scipy.org/doc/numpy/reference/generated/numpy.savetxt.html to output these to a file, if so desired. -Sterling On Mar 11, 2015, at 8:07AM, Prahas David Nafissian <pra...@gm...> wrote: > Hi, > > Given the Lorenz code shared yesterday, is there a way > to generate a log file of the x,y,z points generated? > > Thanks in advance. > > --Prahas > > In case you deleted the code: > > > import numpy as np > from scipy import integrate > > from matplotlib import pyplot as plt > from mpl_toolkits.mplot3d import Axes3D > from matplotlib.colors import cnames > from matplotlib import animation > > # orig value of N_traj was 20 -- very cool this way. > > N_trajectories = 1 > > def lorentz_deriv((x, y, z), t0, sigma=10., beta=8./3, rho=28.0): > """Compute the time-derivative of a Lorentz system.""" > return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z] > > # Choose random starting points, uniformly distributed from -15 to 15 > > np.random.seed(1) > > # changing from -15,30 to 10,5 below starts the drawing in the middle, > # rather than getting the long line from below.... > # if using N_Traj > 1, return to orig values. > > # x0 = -15 + 30 * np.random.random((N_trajectories, 3)) > > x0 = 10 + 5 * np.random.random((N_trajectories, 3)) > > > # Solve for the trajectories > > # orig values: 0,4,1000 > # 3rd value -- lower it, it gets choppier. > # 2nd value -- increase it -- more points, but speedier. > > # change middle num from 4 to 15 -- this adds points!!!!!!!! > > t = np.linspace(0, 40, 3000) > x_t = np.asarray([integrate.odeint(lorentz_deriv, x0i, t) > for x0i in x0]) > > # Set up figure & 3D axis for animation > fig = plt.figure() > ax = fig.add_axes([0, 0, 1, 1], projection='3d') > > # changing off to on below adds axises. slows it down but you > # can fix that with interval value in the animation call > > ax.axis('on') > > # choose a different color for each trajectory > colors = plt.cm.jet(np.linspace(0, 1, N_trajectories)) > > # set up lines and points -- this is a correction from > # the orig jake code. the next four lines... > > lines = [ax.plot([], [], [], '-', c=c)[0] > for c in colors] > pts = [ax.plot([], [], [], 'o', c=c)[0] > for c in colors] > > # prepare the axes limits > ax.set_xlim((-25, 25)) > ax.set_ylim((-35, 35)) > ax.set_zlim((5, 55)) > > # set point-of-view: specified by (altitude degrees, azimuth degrees) > ax.view_init(30, 0) > > # initialization function: plot the background of each frame > def init(): > for line, pt in zip(lines, pts): > line.set_data([], []) > line.set_3d_properties([]) > > pt.set_data([], []) > pt.set_3d_properties([]) > return lines + pts > > # animation function. This will be called sequentially with the frame number > def animate(i): > # we'll step two time-steps per frame. This leads to nice results. > > i = (2 * i) % x_t.shape[1] > > for line, pt, xi in zip(lines, pts, x_t): > x, y, z = xi[:i].T > line.set_data(x, y) > line.set_3d_properties(z) > > pt.set_data(x[-1:], y[-1:]) > pt.set_3d_properties(z[-1:]) > > # changed 0.3 to 0.05 below -- this slows the rotation of the view. > # changed 30 to 20 below > # changing 20 to (20 + (.1 * i)) rotates on the Z axis. trippy. > > ax.view_init(10, 0.1 * i) > # ax.view_init(10, 100) > fig.canvas.draw() > return lines + pts > > # instantiate the animator. I've deleted the blit switch (for Mac) > # enlarging frames=500 works now -- it failed before because I didn't give it > # enough data -- by changing the t=np.linspace line above I generate > more points. > # interval larger slows it down > # changed inteval from 30 to 200, frames from 500 to 3000 > > anim = animation.FuncAnimation(fig, animate, init_func=init, > frames=3000, interval=200) > > # Save as mp4. This requires mplayer or ffmpeg to be installed. COMPLEX!!!!! > # Instead, use a screen record program: Quicktime on the Mac; MS > Expression Encoder on PC. > # anim.save('PDNlorentz_attractor.mp4', fps=15, extra_args=['-vcodec', > 'libx264']) > > plt.show() > > ------------------------------------------------------------------------------ > 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 |
From: Prahas D. N. <pra...@gm...> - 2015-03-11 15:08:00
|
Hi, Given the Lorenz code shared yesterday, is there a way to generate a log file of the x,y,z points generated? Thanks in advance. --Prahas In case you deleted the code: import numpy as np from scipy import integrate from matplotlib import pyplot as plt from mpl_toolkits.mplot3d import Axes3D from matplotlib.colors import cnames from matplotlib import animation # orig value of N_traj was 20 -- very cool this way. N_trajectories = 1 def lorentz_deriv((x, y, z), t0, sigma=10., beta=8./3, rho=28.0): """Compute the time-derivative of a Lorentz system.""" return [sigma * (y - x), x * (rho - z) - y, x * y - beta * z] # Choose random starting points, uniformly distributed from -15 to 15 np.random.seed(1) # changing from -15,30 to 10,5 below starts the drawing in the middle, # rather than getting the long line from below.... # if using N_Traj > 1, return to orig values. # x0 = -15 + 30 * np.random.random((N_trajectories, 3)) x0 = 10 + 5 * np.random.random((N_trajectories, 3)) # Solve for the trajectories # orig values: 0,4,1000 # 3rd value -- lower it, it gets choppier. # 2nd value -- increase it -- more points, but speedier. # change middle num from 4 to 15 -- this adds points!!!!!!!! t = np.linspace(0, 40, 3000) x_t = np.asarray([integrate.odeint(lorentz_deriv, x0i, t) for x0i in x0]) # Set up figure & 3D axis for animation fig = plt.figure() ax = fig.add_axes([0, 0, 1, 1], projection='3d') # changing off to on below adds axises. slows it down but you # can fix that with interval value in the animation call ax.axis('on') # choose a different color for each trajectory colors = plt.cm.jet(np.linspace(0, 1, N_trajectories)) # set up lines and points -- this is a correction from # the orig jake code. the next four lines... lines = [ax.plot([], [], [], '-', c=c)[0] for c in colors] pts = [ax.plot([], [], [], 'o', c=c)[0] for c in colors] # prepare the axes limits ax.set_xlim((-25, 25)) ax.set_ylim((-35, 35)) ax.set_zlim((5, 55)) # set point-of-view: specified by (altitude degrees, azimuth degrees) ax.view_init(30, 0) # initialization function: plot the background of each frame def init(): for line, pt in zip(lines, pts): line.set_data([], []) line.set_3d_properties([]) pt.set_data([], []) pt.set_3d_properties([]) return lines + pts # animation function. This will be called sequentially with the frame number def animate(i): # we'll step two time-steps per frame. This leads to nice results. i = (2 * i) % x_t.shape[1] for line, pt, xi in zip(lines, pts, x_t): x, y, z = xi[:i].T line.set_data(x, y) line.set_3d_properties(z) pt.set_data(x[-1:], y[-1:]) pt.set_3d_properties(z[-1:]) # changed 0.3 to 0.05 below -- this slows the rotation of the view. # changed 30 to 20 below # changing 20 to (20 + (.1 * i)) rotates on the Z axis. trippy. ax.view_init(10, 0.1 * i) # ax.view_init(10, 100) fig.canvas.draw() return lines + pts # instantiate the animator. I've deleted the blit switch (for Mac) # enlarging frames=500 works now -- it failed before because I didn't give it # enough data -- by changing the t=np.linspace line above I generate more points. # interval larger slows it down # changed inteval from 30 to 200, frames from 500 to 3000 anim = animation.FuncAnimation(fig, animate, init_func=init, frames=3000, interval=200) # Save as mp4. This requires mplayer or ffmpeg to be installed. COMPLEX!!!!! # Instead, use a screen record program: Quicktime on the Mac; MS Expression Encoder on PC. # anim.save('PDNlorentz_attractor.mp4', fps=15, extra_args=['-vcodec', 'libx264']) plt.show() |
From: Benjamin R. <ben...@ou...> - 2015-03-11 15:04:17
|
Thomas described the work-around and provided a link. Put both of the legends on the second axes. It is a kludge, for sure, but it is all you can do. On Wed, Mar 11, 2015 at 10:58 AM, liu lily <pol...@gm...> wrote: > thanks, > then are there any workaround on my case? > or are there any other libaries which I CAN use to plot and manipulate the > GUI? > > On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root <ben...@ou...> wrote: > >> By "top" he means "whichever axes was added most recently". When twining, >> the new axes is added on top of the original axes. >> >> I hope that clears it up. >> >> Ben Root >> >> On Wed, Mar 11, 2015 at 10:05 AM, liu lily <pol...@gm...> >> wrote: >> >>> I dont understand >>> you say it is the first axe >>> but why in my case, only the second legend is draggable? it is in the >>> second axe >>> >>> besides, since I have to use both y-axis on the left and on the right, >>> it seems I have to have two axes, >>> are there any workarounds? thanks! >>> >>> On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell <tca...@gm...> >>> wrote: >>> >>>> The mouse events only propagate to the top axes. You will have to add >>>> both legends to the same (top) axes. >>>> >>>> See http://matplotlib.org/users/legend_guide.html#multiple-legend >>>> >>>> >>>> Tom >>>> On Wed, Mar 11, 2015, 08:57 liu lily <pol...@gm...> wrote: >>>> >>>>> Hi, all: >>>>> >>>>> I have two legends, as below, I find that I can't drag the first >>>>> legend, what is the problem? how to deal with it? thanks! >>>>> >>>>> import matplotlib.pyplot as plt >>>>> >>>>> fig1, ax1 = plt.subplots() >>>>> ax2 = ax1.twinx() >>>>> >>>>> ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one") >>>>> ax2.plot([1,2,3],[5,6,7],'ro', label="two") >>>>> >>>>> leg1 = ax1.legend() >>>>> leg2 = ax2.legend() >>>>> >>>>> leg1.draggable(state=True) >>>>> leg2.draggable(state=True) >>>>> plt.show() >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> 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 >>>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> > |
From: Thomas C. <tca...@gm...> - 2015-03-11 15:02:47
|
As I said in the first email, you need to put both legend artists on the top axes. The link is to the documentation on _how_ to put more than one legend in the same axes. Tom On Wed, Mar 11, 2015 at 10:58 AM liu lily <pol...@gm...> wrote: > thanks, > then are there any workaround on my case? > or are there any other libaries which I CAN use to plot and manipulate the > GUI? > > On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root <ben...@ou...> wrote: > >> By "top" he means "whichever axes was added most recently". When twining, >> the new axes is added on top of the original axes. >> >> I hope that clears it up. >> >> Ben Root >> >> On Wed, Mar 11, 2015 at 10:05 AM, liu lily <pol...@gm...> >> wrote: >> >>> I dont understand >>> you say it is the first axe >>> but why in my case, only the second legend is draggable? it is in the >>> second axe >>> >>> besides, since I have to use both y-axis on the left and on the right, >>> it seems I have to have two axes, >>> are there any workarounds? thanks! >>> >>> On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell <tca...@gm...> >>> wrote: >>> >>>> The mouse events only propagate to the top axes. You will have to add >>>> both legends to the same (top) axes. >>>> >>>> See http://matplotlib.org/users/legend_guide.html#multiple-legend >>>> >>>> >>>> Tom >>>> On Wed, Mar 11, 2015, 08:57 liu lily <pol...@gm...> wrote: >>>> >>>>> Hi, all: >>>>> >>>>> I have two legends, as below, I find that I can't drag the first >>>>> legend, what is the problem? how to deal with it? thanks! >>>>> >>>>> import matplotlib.pyplot as plt >>>>> >>>>> fig1, ax1 = plt.subplots() >>>>> ax2 = ax1.twinx() >>>>> >>>>> ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one") >>>>> ax2.plot([1,2,3],[5,6,7],'ro', label="two") >>>>> >>>>> leg1 = ax1.legend() >>>>> leg2 = ax2.legend() >>>>> >>>>> leg1.draggable(state=True) >>>>> leg2.draggable(state=True) >>>>> plt.show() >>>>> >>>>> ------------------------------------------------------------ >>>>> ------------------ >>>>> 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 >>>>> >>>> >>> >>> >>> ------------------------------------------------------------------------------ >>> 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 >>> >>> >> > |
From: liu l. <pol...@gm...> - 2015-03-11 14:58:18
|
thanks, then are there any workaround on my case? or are there any other libaries which I CAN use to plot and manipulate the GUI? On Wed, Mar 11, 2015 at 3:54 PM, Benjamin Root <ben...@ou...> wrote: > By "top" he means "whichever axes was added most recently". When twining, > the new axes is added on top of the original axes. > > I hope that clears it up. > > Ben Root > > On Wed, Mar 11, 2015 at 10:05 AM, liu lily <pol...@gm...> wrote: > >> I dont understand >> you say it is the first axe >> but why in my case, only the second legend is draggable? it is in the >> second axe >> >> besides, since I have to use both y-axis on the left and on the right, it >> seems I have to have two axes, >> are there any workarounds? thanks! >> >> On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell <tca...@gm...> >> wrote: >> >>> The mouse events only propagate to the top axes. You will have to add >>> both legends to the same (top) axes. >>> >>> See http://matplotlib.org/users/legend_guide.html#multiple-legend >>> >>> >>> Tom >>> On Wed, Mar 11, 2015, 08:57 liu lily <pol...@gm...> wrote: >>> >>>> Hi, all: >>>> >>>> I have two legends, as below, I find that I can't drag the first >>>> legend, what is the problem? how to deal with it? thanks! >>>> >>>> import matplotlib.pyplot as plt >>>> >>>> fig1, ax1 = plt.subplots() >>>> ax2 = ax1.twinx() >>>> >>>> ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one") >>>> ax2.plot([1,2,3],[5,6,7],'ro', label="two") >>>> >>>> leg1 = ax1.legend() >>>> leg2 = ax2.legend() >>>> >>>> leg1.draggable(state=True) >>>> leg2.draggable(state=True) >>>> plt.show() >>>> >>>> ------------------------------------------------------------ >>>> ------------------ >>>> 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 >>>> >>> >> >> >> ------------------------------------------------------------------------------ >> 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 >> >> > |
From: Benjamin R. <ben...@ou...> - 2015-03-11 14:54:37
|
By "top" he means "whichever axes was added most recently". When twining, the new axes is added on top of the original axes. I hope that clears it up. Ben Root On Wed, Mar 11, 2015 at 10:05 AM, liu lily <pol...@gm...> wrote: > I dont understand > you say it is the first axe > but why in my case, only the second legend is draggable? it is in the > second axe > > besides, since I have to use both y-axis on the left and on the right, it > seems I have to have two axes, > are there any workarounds? thanks! > > On Wed, Mar 11, 2015 at 2:22 PM, Thomas Caswell <tca...@gm...> > wrote: > >> The mouse events only propagate to the top axes. You will have to add >> both legends to the same (top) axes. >> >> See http://matplotlib.org/users/legend_guide.html#multiple-legend >> >> >> Tom >> On Wed, Mar 11, 2015, 08:57 liu lily <pol...@gm...> wrote: >> >>> Hi, all: >>> >>> I have two legends, as below, I find that I can't drag the first legend, >>> what is the problem? how to deal with it? thanks! >>> >>> import matplotlib.pyplot as plt >>> >>> fig1, ax1 = plt.subplots() >>> ax2 = ax1.twinx() >>> >>> ax1.plot([1,2,3],[0.1,0.82,0.3],'y*', label="one") >>> ax2.plot([1,2,3],[5,6,7],'ro', label="two") >>> >>> leg1 = ax1.legend() >>> leg2 = ax2.legend() >>> >>> leg1.draggable(state=True) >>> leg2.draggable(state=True) >>> plt.show() >>> >>> ------------------------------------------------------------ >>> ------------------ >>> 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 >>> >> > > > ------------------------------------------------------------------------------ > 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 > > |