Re: [Matplotlib-users] invalid command name randomNumbercallit
I have now change my code and I have done the following. I have open a Tkinter toplevel, and worked on it: def OnButtonBress(self,) self.fig= matplotlip.figure.figure() (... here I have build the code to build my axis using the self.fig.add_subplot() function ) root=Tk.Toplevel() canvas = FigureCanvasTkAgg(self.fig, master=root) canvas.show() canvas.get_tk_widget().pack(side='top', fill='both', expand=1) toolbar = NavigationToolbar2TkAgg( canvas, root ) toolbar.update() canvas._tkcanvas.pack(side='top', fill='both', expand=1) But when I close the window, the same message... I tried to make some prints function to make debug in the backend_tkagg.py file whoever an destroy command is called. I have tried to print the id's of the self.__idle_callback to see if the randomNumber is the same, but when it plots the Tk.Window and my graphs, nothing has been printed. I want to ask, what is calling after the window has been destroyed? Because I have make code do destroy this window whenever I want. And when I call the function root.destroy() the above error message is printed to the shell. Best regards, A.Paiva -- View this message in context: http://matplotlib.1069221.n5.nabble.com/invalid-command-name-randomNumbercallit-tp42585p42588.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Normalizing Marker Size in Legend
Matthew, I think you're on the right track. You need proxy artists of some sort. You can create Line2D objects directly, never add them to the figure, and then use those to create the legend. An alternatively/hacky approach I often use is to the plot all the real data with '_nolegend' labels, get my current (or desired) axes limits, then plot the negative value of my data with the symbology I want in the legend and restore my original axes limits. This works for me b/c I'm always dealing with rainfall or water quality data, so negative values aren't really a thing for me to worry about. The concept is solid though: 1) plot the data (no labels) 2) record axes limit 3) plot fake data far away from real data with legend-appropriate symbology 4) restore axes limits 5) create legend. On Wed, Dec 4, 2013 at 3:48 PM, Matthew Niznik matthew.nizn...@gmail.comwrote: Hi all, I have a plot in which I have 15 markers, each with a separate size (created by calls to plot()). Because of this, the legend also shows variable size by default but I'd like all markers in the legend to have the same size. I'm looking for an alternative to manually calling plot again with a standardized marker size (say 10.0) but plotting offscreen or with NANs. Thoughts I had were to either change the marker sizes after the legend is drawn (but it seems very difficult to update a legend post-creation) or to copy the handles and change the size that way (but I've yet to figure out how to make a hard copy of the plot handles). Any solutions? -- Matthew Niznik -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Question about basic_example_writer.py
Hmmm, sounds like a bug of some sort. Perhaps a pixel size is not being specified when creating the movie. Could you file an issue detailing exactly which version of mpl you are using and which movie writer you are using? Cheers! Ben Root On Wed, Nov 27, 2013 at 11:57 AM, Andreas Hilboll li...@hilboll.de wrote: Hi, when running basic_example_writer.py, I get *.mp4 files with a canvas size of 800x600 pixels (at least that's what mplayer tells me). However, I have trouble understanding where this canvas size comes from. The example does not explicitly set the dpi or the figure size, and I don't have a matplotlibrc which changes these settings. So figure.dpi is 80, and the fig.size_inches is (8, 6). So how come this translates to a 800x600 pixel movie? Thanks for you insight :) -- Andreas. -- Rapidly troubleshoot problems before they affect your business. Most IT organizations don't have a clear picture of how application performance affects their revenue. With AppDynamics, you get 100% visibility into your Java,.NET, PHP application. Start your 15-day FREE TRIAL of AppDynamics Pro! http://pubads.g.doubleclick.net/gampad/clk?id=84349351iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] setting x tick labels with matshow
Kelson, Reading the documentation of matshow help(matshow) reveals that it passes most keywords to imshow. Documentation of imshow help(imshow) says it has an extent keyword to indicate the x and y ranges (instead of the array index). So something like (untested) matshow(your matrix,extent=(left,right,bottom,top)) #where left is probably min(x), right is max(x), etc. should work. -Sterling On Dec 4, 2013, at 5:07PM, Kelson Zawack wrote: I am trying to create a figure that plots a data matrix with matshow and has x tick labels corresponding to the x dimension of the matrix. The x dimension is a series of floats, but they don't correspond to the data matrix cell index values (0,1,2…) that make up what matplotlib obviously thinks are the x values for the plot. Is there a way that I can set the x tick labels so that they will be laid out and formatted in the normal way for numbers on the x-axis? It would be great if they also scaled in the normal way when the plot is manipulated in the little gui window. Thanks for the help. -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Normalizing Marker Size in Legend
Matthew, See the discussion at http://matplotlib.1069221.n5.nabble.com/Legend-Marker-Color-Bug-td38695.html -Sterling On Dec 4, 2013, at 3:48PM, Matthew Niznik wrote: Hi all, I have a plot in which I have 15 markers, each with a separate size (created by calls to plot()). Because of this, the legend also shows variable size by default but I'd like all markers in the legend to have the same size. I'm looking for an alternative to manually calling plot again with a standardized marker size (say 10.0) but plotting offscreen or with NANs. Thoughts I had were to either change the marker sizes after the legend is drawn (but it seems very difficult to update a legend post-creation) or to copy the handles and change the size that way (but I've yet to figure out how to make a hard copy of the plot handles). Any solutions? -- Matthew Niznik -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Sponsored by Intel(R) XDK Develop, test and display web and hybrid apps with a single code base. Download it for free now! http://pubads.g.doubleclick.net/gampad/clk?id=111408631iu=/4140/ostg.clktrk ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users