[Matplotlib-users] IPython's matplotlib inline magic is really magic? Actually it might resets axes bounds...
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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Corr plot in subplot
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 pmhob...@gmail.com 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 sudheer.jos...@yahoo.com 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.in...@gmail.com;sudheer.jos...@yahoo.com 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IPython's matplotlib inline magic is really magic? Actually it might resets axes bounds...
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 rnelsonc...@gmail.com 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Less tedious way to change the x-axis scale intervals with time series data?
Hello, I'm trying to learn if there is a better or less tedious way of changing the x-axis time scale interval size when plotting time series data using MATPLOTLIB. To account for all the different x-axis intervals that I may end up using, I usually do the following imports: from matplotlib.dates import YearLocator, MonthLocator, WeekdayLocator, DateFormatter, DayLocator from matplotlib.dates import MO, TU, WE, TH, FR, SA, SU Then I specify specific intervals by doing the following: year = YearLocator() month = MonthLocator(bymonth=range(1,13), bymonthday=1, interval=1) week = WeekdayLocator(byweekday=MO) # Every MOnday day= DayLocator(bymonthday=range(1,32), interval=1) Then apply any of the above formats by doing: axes.xaxis.set_major_locator(year) axes.xaxis.set_major_locator(month) I find all that above too tedious since I may then decide to change the intervals to something different to experiment. With R's ggplot2 or Yhat's ggplot, it is very simple and intuitive to change the x-axis scale interval. You just need to specify the breaks and minor_breaks interval like so: scale_x_datetime(labels=date_format(%Y-%m), breaks=3 months, minor_breaks=1 month) I've quit using MATPLOTLIB for plotting time series data because of this. However, I thought perhaps there is a better way that I am not aware of. If there is a better way, please educate me! Thanks! -- View this message in context: http://matplotlib.1069221.n5.nabble.com/Less-tedious-way-to-change-the-x-axis-scale-intervals-with-time-series-data-tp45175.html Sent from the matplotlib - users mailing list archive at Nabble.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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] [IPython-dev] IPython's matplotlib inline magic is really magic? Actually it might resets axes bounds...
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.tur...@gmail.com wrote: Ryan, http://wrdrd.github.io/docs/consulting/data-science.html#data-visualization-tools On Mar 13, 2015 1:59 PM, Ryan Nelson rnelsonc...@gmail.com 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 ipython-...@scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev ___ IPython-dev mailing list ipython-...@scipy.org http://mail.scipy.org/mailman/listinfo/ipython-dev -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] IPython's matplotlib inline magic is really magic? Actually it might resets axes bounds...
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 tcasw...@gmail.com 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 rnelsonc...@gmail.com 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net
Re: [Matplotlib-users] Plotting style
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 Matplotlib-users@lists.sourceforge.net 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 ✉ marin.gil...@u-bourgogne.fr mailto:marin.gil...@u-bourgogne.fr -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] svg format graph: lines out of box
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 politoeso...@gmail.com 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 politoeso...@gmail.com 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] svg format graph: lines out of box
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 politoeso...@gmail.com: 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 politoeso...@gmail.com 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 politoeso...@gmail.com 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 Matplotlib-users@lists.sourceforge.net 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] svg format graph: lines out of box
Le vendredi 13 mars 2015 à 13:41 +0100, Fabrice Silva a écrit : Le vendredi 13 mars 2015 à 10:59 +, 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...@lma.cnrs-mrs.fr -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] svg format graph: lines out of box
Le vendredi 13 mars 2015 à 10:59 +, 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 -- 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Corr plot in subplot
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.in...@gmail.com;sudheer.jos...@yahoo.com 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 Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users