Re: [Matplotlib-users] subplot_adjust bug?
> "humufr" == humufr <[EMAIL PROTECTED]> writes: humufr> Hi, I have a problem with subplot_adjust but I don't know humufr> if it's a bug or because I didn't understand how to use humufr> it... humufr> I would like to create a 2 by 3 plots without space humufr> between the subplot and I can't arrive to manage it... humufr> Is the results of the next script is normal? Definitely a bug. I always write code like the following, which works. fig1 = pylab.figure() fig1.subplots_adjust(wspace=0,hspace=0) ax1 = fig1.add_subplot(231) ax2 = fig1.add_subplot(232) ax3 = fig1.add_subplot(233) ax4 = fig1.add_subplot(234) ax5 = fig1.add_subplot(235) ax6 = fig1.add_subplot(236) The problem is in pylab subplot, which has the feature of deleting new subplots if they overlap old ones. Basically it is a problem of an open ended versus closed ended overlap test. The overlap function is indicating the two axes overlap when the hspace or wspace is zero, and should not. I need to tweak the overlap function to take an optional arg so that endpoint overlap is OK. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] subplot_adjust bug?
> "John" == John Hunter <[EMAIL PROTECTED]> writes: John> I need to tweak the overlap function to take an optional arg John> so that endpoint overlap is OK. OK, this is now fixed in svn. Thanks for the report. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] standardizing x-axes in hist
On Nov 1, 2006, at 2:15 PM, John Hunter wrote: >> "listservs" == listservs <[EMAIL PROTECTED]> writes: > > listservs> I am trying to produce a series of histograms of > listservs> related data, for which I want the ranges and scales of > listservs> the x-axes to be the same. However, I dont see an > listservs> obvious way of doing this with hist, since specifying > listservs> nbins will not guarantee the same axis for each. Is > listservs> there some sort of hack that I can use to do this (or > listservs> an argument I am overlooking?). > > > You can force axes in the same figure to share the same xaxes > > ax1 = subplot(211) > ax2 = subplot(212, sharex=ax1) > > then any changes (panning and zooming) in one will be instantaneously > reflected in the other. > > For axes in different figures, you can set the xlim manually > > ax1.set_xlim(xmin, xmax) > ax2.set_xlim(xmin, xmax) > > There is more sophisticated stuff you can do with observers and event > handling to couple axes between figures in the presence of panning and > zooming if need be. I was able to get a common x-axis for all plots, but the bar width remains inconsistent with very thick plots on some histograms, and very thin ones on others. What is the secret here? I need to get equal-width, non-overlapping bars on all the plots. I'm surprised that these issues have not come up before. For publication in scientific journals, most editors would want consistent scales for any series of plots. Thanks for any ideas, Chris -- Christopher Fonnesbeck [EMAIL PROTECTED] - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] subplot_adjust bug?
Le Jeudi 2 Novembre 2006 09:19, John Hunter a écrit : > > "John" == John Hunter <[EMAIL PROTECTED]> writes: > > John> I need to tweak the overlap function to take an optional arg > John> so that endpoint overlap is OK. > > OK, this is now fixed in svn. Thanks for the report. The solution gave by Eric works too and with your solution I saw that I had to force myself to use a more pythonic writing in my software... But if far better with the bug corrected. Thanks to have done it so fast. I'm always impressed. N. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Drawing horizontal bar charts
Hello, Can you help with some examples for drawing bar charts in matplotlib..>>/// Best Regards, Asrarahmed-- To HIM you shall return. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing horizontal bar charts
> "Asrarahmed" == Asrarahmed Kadri <[EMAIL PROTECTED]> writes: Asrarahmed> Hello, Can you help with some examples for drawing bar Asrarahmed> charts in matplotlib..>>/// Did you see my previous email responding to your "a query" post, where I pointed you to two examples? Here is another specifically for horizontal bar charts: http://matplotlib.sourceforge.net/examples/barh_demo.py JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] standardizing x-axes in hist
When building your histograms, define your bins by means of either 'arange' (to set the same bin width) or 'linspace' (to set equally-spaced bin limits). Eg, if all your histograms will have an x-axis ranging from 0 to 100, and you want the data in each of them plotted into 12 equally-spaced bins, then all you have to do is: bins = linspace(0, 100, 13) # sets 13 bin limits, ie 12 bins h1 = hist(data1, bins) h2 = hist(data2, bins) ... If what you want is to plot each data set into 10-units-width bins (within the same 0-to-100 x-axis): bins = arange(0, 100+10, 10) # sets bin widths h1 = hist(data1, bins) h2 = hist(data2, bins) ... /Antonio Christopher Fonnesbeck wrote: > On Nov 1, 2006, at 2:15 PM, John Hunter wrote: > >>> "listservs" == listservs <[EMAIL PROTECTED]> writes: >> listservs> I am trying to produce a series of histograms of >> listservs> related data, for which I want the ranges and scales of >> listservs> the x-axes to be the same. However, I dont see an >> listservs> obvious way of doing this with hist, since specifying >> listservs> nbins will not guarantee the same axis for each. Is >> listservs> there some sort of hack that I can use to do this (or >> listservs> an argument I am overlooking?). >> >> >> You can force axes in the same figure to share the same xaxes >> >> ax1 = subplot(211) >> ax2 = subplot(212, sharex=ax1) >> >> then any changes (panning and zooming) in one will be instantaneously >> reflected in the other. >> >> For axes in different figures, you can set the xlim manually >> >> ax1.set_xlim(xmin, xmax) >> ax2.set_xlim(xmin, xmax) >> >> There is more sophisticated stuff you can do with observers and event >> handling to couple axes between figures in the presence of panning and >> zooming if need be. > > I was able to get a common x-axis for all plots, but the bar width > remains inconsistent with very thick plots on some histograms, and > very thin ones on others. What is the secret here? I need to get > equal-width, non-overlapping bars on all the plots. > > I'm surprised that these issues have not come up before. For > publication in scientific journals, most editors would want > consistent scales for any series of plots. > > Thanks for any ideas, > Chris > > -- > Christopher Fonnesbeck > [EMAIL PROTECTED] > > > > > - > Using Tomcat but need to do more? Need to support web services, security? > Get stuff done quickly with pre-integrated technology to make your job easier > Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo > http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing horizontal bar charts
Thank you so much. One more thing: How can save teh graph in a file and then embed it in a Tkinter canvas widget,...?? TIA (Thanks in anticipation). REgards, Asrarahmed On 11/2/06, John Hunter <[EMAIL PROTECTED]> wrote: > "Asrarahmed" == Asrarahmed Kadri < [EMAIL PROTECTED]> writes: Asrarahmed> Hello, Can you help with some examples for drawing bar Asrarahmed> charts in matplotlib..>>///Did you see my previous email responding to your "a query" post, where I pointed you to two examples?Here is another specifically for horizontal bar charts:http://matplotlib.sourceforge.net/examples/barh_demo.py JDH-- To HIM you shall return. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Drawing horizontal bar charts
> "Asrarahmed" == Asrarahmed Kadri <[EMAIL PROTECTED]> writes: Asrarahmed> Thank you so much. One more thing: How can save teh Asrarahmed> graph in a file and then embed it in a Tkinter canvas Asrarahmed> widget,...?? you don't need to first save the graph -- though you can. You can embed matplotlib directly. See http://matplotlib.sourceforge.net/examples/embedding_in_tk.py http://matplotlib.sourceforge.net/examples/embedding_in_tk2.py At this point, it would be a good idea for you to spend some time reading the documentation on the website, as many of these ideas are covered there. JDH - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] another problem with subplot...
and the same question: this behavior is normal? fig1 = figure() ax1 = subplot(121) xlim([0,10]) ax2 = subplot(122,sharey=ax1) yticks([]) I would like to hide the ticks label for only one subplot (the one who share the axes) but I would like to have the ticklabels for the global plot, ie on the left subplot. I was thinking that sharey means that the plot will have the same limit for this axes not to have all the properties. Do I have to tell to all the subplot to have the same limit and remove the ticks for the one I want? N. - Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users