Re: [Matplotlib-users] background color of text plots as foreground
Fails on MacOSX backend. Just tried it, and it works fine with the QT backend. So I guess a MacOSX bug... Thanks for your help, Mark On Thu, Jul 9, 2015 at 6:18 PM, Sterling Smith smit...@fusion.gat.com wrote: Works for me with TkAgg backend on 1.4.3. -Sterling On Jul 9, 2015, at 3:52AM, Mark Bakker mark...@gmail.com wrote: Hello list, I am trying to set the backgroundcolor of a textbox: from pylab import * plot([1, 2, 3]) text(1, 2, 'Hello', backgroundcolor = 'red') This plots a nice red box but no text. It looks like the backgroundcolor is set as the foreground. Am I doing something wrong or is this a bug? mpl version 1.4.3 Thanks, Mark -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] background color of text plots as foreground
Hello list, I am trying to set the backgroundcolor of a textbox: from pylab import * plot([1, 2, 3]) text(1, 2, 'Hello', backgroundcolor = 'red') This plots a nice red box but no text. It looks like the backgroundcolor is set as the foreground. Am I doing something wrong or is this a bug? mpl version 1.4.3 Thanks, Mark -- Don't Limit Your Business. Reach for the Cloud. GigeNET's Cloud Solutions provide you with the tools and support that you need to offload your IT needs and focus on growing your business. Configured For All Businesses. Start Your Cloud Today. https://www.gigenetcloud.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] sharex with one figure aspect = 1.0
Thanks, Thomas. That works indeed, but it doesn't make the figure adjustable, which is what I wanted (that the physical size of the axes changes while the aspect ratio is fixed to 1). I guess that functionality has been taken out. Mark On Wed, Apr 8, 2015 at 12:50 PM, Thomas Caswell tcasw...@gmail.com wrote: What are the data limits you are using? I suspect they you are over constraining the system/order of operations issue. Try dropping the adjustable setting and pre setting both the data limits and the approximate size in figure fraction (ex via grid spec) of the axes. Tom On Tue, Apr 7, 2015, 15:54 Mark Bakker mark...@gmail.com wrote: Hello list, I want to axes above each other. They share the x-axis. The top figure has 'aspect=1' (it is a map), the bottom figure shows a cross-section along a horizontal line on the map, so it doesn't have 'aspect=1'. When I do this with code, for example like this: fig, axes = plt.subplots(nrows=2,sharex=True) plt.setp(axes[0], aspect=1.0, adjustable='box-forced') then the physical size of the top axes is much sorter than the physical size of the bottom axes (although they are poperly linked, as they have the same data limit, and when zooming in the top figure, the bottom figure adjusts). It just looks weird, as the size of the horizontal axis of the bottom figure should have the same physical size as the horizontal axis of the top figure. This used to be possible (a few years ago; haven't tried it for a while). Is there a way to do it with the current matpotlib? (1.4.3) Thanks, Mark -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_ campaign=VA_SF___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] sharex with one figure aspect = 1.0
Hello list, I want to axes above each other. They share the x-axis. The top figure has 'aspect=1' (it is a map), the bottom figure shows a cross-section along a horizontal line on the map, so it doesn't have 'aspect=1'. When I do this with code, for example like this: fig, axes = plt.subplots(nrows=2,sharex=True) plt.setp(axes[0], aspect=1.0, adjustable='box-forced') then the physical size of the top axes is much sorter than the physical size of the bottom axes (although they are poperly linked, as they have the same data limit, and when zooming in the top figure, the bottom figure adjusts). It just looks weird, as the size of the horizontal axis of the bottom figure should have the same physical size as the horizontal axis of the top figure. This used to be possible (a few years ago; haven't tried it for a while). Is there a way to do it with the current matpotlib? (1.4.3) Thanks, Mark -- BPM Camp - Free Virtual Workshop May 6th at 10am PDT/1PM EDT Develop your own process in accordance with the BPMN 2 standard Learn Process modeling best practices with Bonita BPM through live exercises http://www.bonitasoft.com/be-part-of-it/events/bpm-camp-virtual- event?utm_ source=Sourceforge_BPM_Camp_5_6_15utm_medium=emailutm_campaign=VA_SF___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Do animations work in Notebook on Mac?
Hello List, I could swear that animations used to work inside a Notebook using the nbagg backend on my Mac. But they seem not to do anything anymore. Just updated to mpl 1.4.2 and am running IPython 2.3.1. Can anybody get the basic example to work: http://matplotlib.org/1.4.2/examples/animation/basic_example.html Thanks, Mark -- 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] Do animations work in Notebook on Mac?
Thanks, Thomas. They sure have a working example. Now I gotta figure out what they do different than I did in the one that didn't work. I'll report back (although things may be fixed with the upcoming 1.4.3 release), Mark On Mon, Feb 2, 2015 at 5:26 PM, Thomas Caswell tcasw...@gmail.com wrote: The nbagg UAT has an animation example: https://github.com/matplotlib/matplotlib/blob/master/lib/matplotlib/backends/web_backend/nbagg_uat.ipynb that should work on 1.4.2. Tom On Mon Feb 02 2015 at 11:17:15 AM Benjamin Root ben.r...@ou.edu wrote: There have been many fixes to the nbagg backend that I think are lined up for the upcoming 1.4.3 release (the release candidate was tagged yesterday). Perhaps it has been fixed there? What version did you upgrade from? Cheers! Ben Root On Mon, Feb 2, 2015 at 10:42 AM, Mark Bakker mark...@gmail.com wrote: Hello List, I could swear that animations used to work inside a Notebook using the nbagg backend on my Mac. But they seem not to do anything anymore. Just updated to mpl 1.4.2 and am running IPython 2.3.1. Can anybody get the basic example to work: http://matplotlib.org/1. 4.2/examples/animation/basic_example.html Thanks, Mark -- 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
[Matplotlib-users] datestr2num for day/month/year
Hello List, datestr2num works great when dates are stored as month/day/year (as American like). Europeans store them as day/month/year. Any quick function to convert a day/month/year string do a date? Is there an eu version: datestr2numeu? Thanks, Mark -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem with patches in animation
Hello list, I am trying to animate a patch. The animation should show a circle orbiting around a point. I took the code from http://nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html Problem is that when I run the code, the animation doesn't remove the initial position of the circle (blit is True) while it works correctly on the website referenced above. Does anybody else see this behavior? Here's the code: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() fig.set_dpi(100) fig.set_size_inches(7, 6.5) ax = plt.axes(xlim=(0, 10), ylim=(0, 10)) patch = plt.Circle((5, -5), 0.75, fc='y') def init(): patch.center = (5, 5) ax.add_patch(patch) return patch, def animate(i): x, y = patch.center x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) patch.center = (x, y) return patch, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=360, interval=20, blit=True) plt.show() Thanks, Mark -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with patches in animation
I thought about that. I even thought about changing the initial color to white or radius to zero. But I am thinking this is a bug. When blitting, whatever is created with the init function is not removed. That is why lines that are animated initially have no data. For a Patch object this is a bit harder, as it needs something to begin with. It seems that this used to work in a previous version. Should I file a bug report? Mark On Wed, Apr 23, 2014 at 3:34 PM, Raymond Smith smit...@mit.edu wrote: Hi Mark, I can't say this is the 'proper' solution or the correct interpretation, but it should work. I think when blitting that the init function serves as a something of a background for the rest of the animation. So try changing def init(): *patch.center = (5, 5)* ax.add_patch(patch) return patch, to def init(): *patch.center = (5, -5)* ax.add_patch(patch) return patch, Cheers, Ray On Wed, Apr 23, 2014 at 5:44 AM, Mark Bakker mark...@gmail.com wrote: Hello list, I am trying to animate a patch. The animation should show a circle orbiting around a point. I took the code from http://nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html Problem is that when I run the code, the animation doesn't remove the initial position of the circle (blit is True) while it works correctly on the website referenced above. Does anybody else see this behavior? Here's the code: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() fig.set_dpi(100) fig.set_size_inches(7, 6.5) ax = plt.axes(xlim=(0, 10), ylim=(0, 10)) patch = plt.Circle((5, -5), 0.75, fc='y') def init(): patch.center = (5, 5) ax.add_patch(patch) return patch, def animate(i): x, y = patch.center x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) patch.center = (x, y) return patch, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=360, interval=20, blit=True) plt.show() Thanks, Mark -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with patches in animation
Benjamin, I don't mind doing classes to store the state, but isn't a Patch already a class? Do you know of an example online that I can work off? Thanks for your suggestions, Mark On Wed, Apr 23, 2014 at 5:12 PM, Benjamin Root ben.r...@ou.edu wrote: I think it is because the figure may or may not have some things drawn by the time the blitting starts. This is due to draw_idle(). So, it is trying to capture whatever is in the figure's canvas, but drawing may or may not have happened yet. Try this: def animate(i): if not animate.patch: animate.patch = plt.Circle((5, -5), 0.75, fc='y') animate.ax.add_patch(animate.patch) x, y = animate.patch.center x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) animate.patch.center = (x, y) return animate.patch, animate.ax = ax animate.patch = None If you have something more complicated, then just go full bore and use classes to store the state. Cheers! Ben Root On Wed, Apr 23, 2014 at 10:51 AM, Raymond Smith smit...@mit.edu wrote: This is pretty weird. If instead of Mark's original script, if I move the add_patch out of init and have the init simply return an empty tuple, it _mostly_ works as expected. But -- at least on my computer -- on some runs, it has the moving circle, but also leaves a circle at the top, starting point, whereas on other runs it simply has the desired moving circle with no 'background' circle. Usually, it will happen at least once if I start the animation script 10 times. So still, the init function is a bit of a mystery to me. import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() fig.set_dpi(100) fig.set_size_inches(7, 6.5) ax = plt.axes(xlim=(0, 10), ylim=(0, 10)) patch = plt.Circle((5, -5), 0.75, fc='y') ax.add_patch(patch) def init(): return tuple() def animate(i): x, y = patch.center patch.set_facecolor('y') patch.set_edgecolor('k') x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) patch.center = (x, y) return patch, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=360, interval=20, blit=True) plt.show() On Wed, Apr 23, 2014 at 10:29 AM, Benjamin Root ben.r...@ou.edu wrote: Working off of very faded memory, try not to return any objects in your init function that you intend to be animated. If I remember correctly, when blitting is True, the animator treats any object returned by the init() function as background objects, and any objects returned by the animation function as blittable. Since your patch is returned in both functions, I think it is getting confused. Again, very rusty memory here... Ben Root On Wed, Apr 23, 2014 at 9:34 AM, Raymond Smith smit...@mit.edu wrote: Hi Mark, I can't say this is the 'proper' solution or the correct interpretation, but it should work. I think when blitting that the init function serves as a something of a background for the rest of the animation. So try changing def init(): *patch.center = (5, 5)* ax.add_patch(patch) return patch, to def init(): *patch.center = (5, -5)* ax.add_patch(patch) return patch, Cheers, Ray On Wed, Apr 23, 2014 at 5:44 AM, Mark Bakker mark...@gmail.com wrote: Hello list, I am trying to animate a patch. The animation should show a circle orbiting around a point. I took the code from http://nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html Problem is that when I run the code, the animation doesn't remove the initial position of the circle (blit is True) while it works correctly on the website referenced above. Does anybody else see this behavior? Here's the code: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() fig.set_dpi(100) fig.set_size_inches(7, 6.5) ax = plt.axes(xlim=(0, 10), ylim=(0, 10)) patch = plt.Circle((5, -5), 0.75, fc='y') def init(): patch.center = (5, 5) ax.add_patch(patch) return patch, def animate(i): x, y = patch.center x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) patch.center = (x, y) return patch, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=360, interval=20, blit=True) plt.show() Thanks, Mark -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet
Re: [Matplotlib-users] problem with patches in animation
Raymond, The documentation says: If blit=True, *func* and *init_func* should return an iterable of drawables to clear. But clearly, whatever is set by init_func is not cleared during animation when blit=True, while it is cleared when blit=False. Unless anybody knows what I am doing wrong I will file a bug report. Thanks again, Mark On Wed, Apr 23, 2014 at 4:25 PM, Raymond Smith smit...@mit.edu wrote: Well, the intended behavior of init() isn't completely clear to me after reading over some of the docs http://matplotlib.org/contents.html and examples http://matplotlib.org/examples/animation/index.html, so I'm not sure if it's a bug or not. Either way, it could be a request for documentation, perhaps. On Wed, Apr 23, 2014 at 10:08 AM, Mark Bakker mark...@gmail.com wrote: I thought about that. I even thought about changing the initial color to white or radius to zero. But I am thinking this is a bug. When blitting, whatever is created with the init function is not removed. That is why lines that are animated initially have no data. For a Patch object this is a bit harder, as it needs something to begin with. It seems that this used to work in a previous version. Should I file a bug report? Mark On Wed, Apr 23, 2014 at 3:34 PM, Raymond Smith smit...@mit.edu wrote: Hi Mark, I can't say this is the 'proper' solution or the correct interpretation, but it should work. I think when blitting that the init function serves as a something of a background for the rest of the animation. So try changing def init(): *patch.center = (5, 5)* ax.add_patch(patch) return patch, to def init(): *patch.center = (5, -5)* ax.add_patch(patch) return patch, Cheers, Ray On Wed, Apr 23, 2014 at 5:44 AM, Mark Bakker mark...@gmail.com wrote: Hello list, I am trying to animate a patch. The animation should show a circle orbiting around a point. I took the code from http://nickcharlton.net/posts/drawing-animating-shapes-matplotlib.html Problem is that when I run the code, the animation doesn't remove the initial position of the circle (blit is True) while it works correctly on the website referenced above. Does anybody else see this behavior? Here's the code: import numpy as np from matplotlib import pyplot as plt from matplotlib import animation fig = plt.figure() fig.set_dpi(100) fig.set_size_inches(7, 6.5) ax = plt.axes(xlim=(0, 10), ylim=(0, 10)) patch = plt.Circle((5, -5), 0.75, fc='y') def init(): patch.center = (5, 5) ax.add_patch(patch) return patch, def animate(i): x, y = patch.center x = 5 + 3 * np.sin(np.radians(i)) y = 5 + 3 * np.cos(np.radians(i)) patch.center = (x, y) return patch, anim = animation.FuncAnimation(fig, animate, init_func=init, frames=360, interval=20, blit=True) plt.show() Thanks, Mark -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Start Your Social Network Today - Download eXo Platform Build your Enterprise Intranet with eXo Platform Software Java Based Open Source Intranet - Social, Extensible, Cloud Ready Get Started Now And Turn Your Intranet Into A Collaboration Platform http://p.sf.net/sfu/ExoPlatform___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] why does floor(x) return a float while docs state it returns integer?
I should have posted this question on the numpy list of course, even though floor is imported with pylab. Off-list, Felix pointed me to the following discussion where some of the reasons are explained why a float is returned rather than an integer: http://stackoverflow.com/questions/8582741/why-do-pythons-math-ceil-and-math-floor-operations-return-floats-instead-of On Mon, Mar 31, 2014 at 5:05 PM, Mark Bakker mark...@gmail.com wrote: I expected that floor(x) would return an integer especially since the docs state: Return the floor of the input, element-wise. The floor of the scalar `x` is the largest integer `i`, such that `i = x`. It is often denoted as :math:`\lfloor x \rfloor`. Any reason why it returns a float? Bug/feature? Thanks, Mark -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] why does floor(x) return a float while docs state it returns integer?
I expected that floor(x) would return an integer especially since the docs state: Return the floor of the input, element-wise. The floor of the scalar `x` is the largest integer `i`, such that `i = x`. It is often denoted as :math:`\lfloor x \rfloor`. Any reason why it returns a float? Bug/feature? Thanks, Mark -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] datestr2num of year and month fails for February on September 30
The design of the function datestr2num, unfortunately, has an undesired side-effect. Today (September 30) I cannot convert monthly data, as February doesn't have 30 days. Conversion of: datestr2num('2000-02') Gives an error: ValueError: day is out of range for month Should I file a bug report or a feature request? Thanks, Mark On Thu, Sep 19, 2013 at 11:38 PM, Goyo goyod...@gmail.com wrote: 2013/9/19 Mark Bakker mark...@gmail.com: Hello List, When I use datestr2num('2010-05') it nicely converts that to a number representing the date. When I convert that number back with num2date, it turns out it sets the day to the 19th of the month. The dime is 0:00:00. Any reason it is set to the 19th instead of the first? Maybe because today it the 19th, or is that just a coincidence? datestr2num calls dateutil.parser.parse, which by default uses the current date at 00:00:00 for missing fields. The dateutil function also can use a default argument to change this bahavoir but it is not available in datestr2num. http://labix.org/python-dateutil#head-a23e8ae0a661d77b89dfb3476f85b26f0b30349c Goyo -- October Webinars: Code for Performance Free Intel webinars can help you accelerate application performance. Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from the latest Intel processors and coprocessors. See abstracts and register http://pubads.g.doubleclick.net/gampad/clk?id=60133471iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] datestr2num of year and month
Hello List, When I use datestr2num('2010-05') it nicely converts that to a number representing the date. When I convert that number back with num2date, it turns out it sets the day to the 19th of the month. The dime is 0:00:00. Any reason it is set to the 19th instead of the first? Maybe because today it the 19th, or is that just a coincidence? Thanks, Mark -- LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99! 1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint 2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. http://pubads.g.doubleclick.net/gampad/clk?id=58041151iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] mixed color dashes
Hello List, I want to make dashes that alternate in color, red, white, blue. Or black, yellow, red, etc. I thought I could overlay different dashes (first draw the black, then the yellow then the red dashes), but the 'dashes' command always starts with a colored dash. What I need is the opposite, start with a blank, then a dash. Or have an offset of xx points and then start the dashed line. Does matplotlib have such a feature? Thanks, Mark -- See everything from the browser to the database with AppDynamics Get end-to-end visibility with application monitoring from AppDynamics Isolate bottlenecks and diagnose root cause in seconds. Start your free trial of AppDynamics Pro today! http://pubads.g.doubleclick.net/gampad/clk?id=48808831iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] large space after superscript in mathtype
Hello List, I want to put the following text on a graph, for example along the x-axis: xlabel('$m^3/d$') This should show the letter m raised to the power 3 and then a slash and the letter d. When I do this, there appears a large space after the power 3 and the slash. So much so that the copy editor of the journal I am publishing in asked me to remove the extra white space. Any suggestions on how to do that? Thanks, Mark -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] large space after superscript in mathtype
I found out a \! (negative thin space in Latex) works. xlabel('$m^3\!/d$') On Tue, Feb 19, 2013 at 10:15 AM, Mark Bakker mark...@gmail.com wrote: Hello List, I want to put the following text on a graph, for example along the x-axis: xlabel('$m^3/d$') This should show the letter m raised to the power 3 and then a slash and the letter d. When I do this, there appears a large space after the power 3 and the slash. So much so that the copy editor of the journal I am publishing in asked me to remove the extra white space. Any suggestions on how to do that? Thanks, Mark -- Everyone hates slow websites. So do we. Make your web apps faster with AppDynamics Download AppDynamics Lite for free today: http://p.sf.net/sfu/appdyn_d2d_feb___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Is there an update on: Matplotlib 1.1.0 animation vs. contour plots?
Hello List, Apparently, it is not straightforward to make an animation of contour plots. I found a discussion (and work-around solution including punching ducks) on the list through this link: punch the QuadContourSet until it behaves like an Artisthttp://old.nabble.com/Matplotlib-1.1.0-animation-vs.-contour-plots-td32835814.html Has there been a fix since then? It would be nice if contours work with animations like the other plots. If not, no big deal. Thanks, Mark -- Don't let slow site performance ruin your business. Deploy New Relic APM Deploy New Relic app performance management and know exactly what is happening inside your Ruby, Python, PHP, Java, and .NET app Try New Relic at no cost today and get our sweet Data Nerd shirt too! http://p.sf.net/sfu/newrelic-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to determine position of axes after imshow?
I am glad to see you can reproduce the error, Stan. I am running whatever is default with a PythonXY installation (sorry my windows machine is at work). Strange behavior. The code works fine on my mac (PyQt4 backend) with all options (show,draw,pause). Should we file a bug report? Mark On Thu, Aug 9, 2012 at 4:02 PM, Stan West stan.w...@nrl.navy.mil wrote: ** *From:* Mark Bakker [mailto:mark...@gmail.com] *Sent:* Tuesday, August 07, 2012 06:42 I tried a few things and found out that doing a pause works. So why does a pause work, but a draw() or show() does not? This all on Windows using the standard PythonXY installation. Here is the code that works (testimage.py): from pylab import * c = ones((10,20)) ax = imshow(c) pause(0.01) print ax.get_axes().get_position() Running from IPython: run testimage Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) I modified your script to test show(), draw(), and pause(); it's attached. For the WXAgg matplotlib backend, I get: In [1]: print(matplotlib.get_backend()) WXAgg In [2]: %run testimage show: Bbox(array([[ 0.125, 0.1 ], [ 0.9 , 0.9 ]])) draw: Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) pause: Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) but for the Qt4Agg backend, I get: In [1]: print(matplotlib.get_backend()) Qt4Agg In [2]: %run testimage show: Bbox(array([[ 0.125, 0.1 ], [ 0.9 , 0.9 ]])) draw: Bbox(array([[ 0.125, 0.1 ], [ 0.9 , 0.9 ]])) pause: Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) Which backend have you been using? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to determine position of axes after imshow?
I tried a few things and found out that doing a pause works. So why does a pause work, but a draw() or show() does not? This all on Windows using the standard PythonXY installation. Here is the code that works (testimage.py): from pylab import * c = ones((10,20)) ax = imshow(c) pause(0.01) print ax.get_axes().get_position() Running from IPython: run testimage Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) On Wed, Aug 1, 2012 at 8:56 PM, Stan West stan.w...@nrl.navy.mil wrote: ** *From:* Mark Bakker [mailto:mark...@gmail.com] *Sent:* Monday, July 30, 2012 05:54 Hello List, I am trying to determine the position of the axes after an imshow and am having problems. I get a different answer on my Mac (the correct answer) than Windows (the wrong answer). [...] Any thoughts? When I type the commands in at the IPython prompt it works most of the time (on Windows), but it never works when running the file. What in the world could be different? mp version 1.1.0 on both systems. Are you using the same backend on both systems? Perhaps when you run the script within IPython on your Windows system, the show() call is not triggering a draw. You can force drawing by calling draw() before show(). I hope that helps. -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to determine position of axes after imshow?
Hello List, I am trying to determine the position of the axes after an imshow and am having problems. I get a different answer on my Mac (the correct answer) than Windows (the wrong answer). I have a file called testimage.py with 5 lines: from pylab import * c = ones((10,20)) ax = imshow(c) show() print ax.get_axes().get_position() I run this file from IPython. On my Mac I get: run testimage Bbox(array([[ 0.125 , 0.2417], [ 0.9 , 0.7583]])) On Windows I get (the wrong answer): run testimage Bbox(array([[ 0.125, 0.1 ], [0.9, 0.9 ]])) Any thoughts? When I type the commands in at the IPython prompt it works most of the time (on Windows), but it never works when running the file. What in the world could be different? mp version 1.1.0 on both systems. Thanks for your help, Mark -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] easy question on ytick label format
Hello List, I want to plot plot([1000,2000]) Then on the y-axis, I want labels 1 and 2, and at the top of the y-axis I want E3. This works automatically with plot([1e7,2e7]). But I assume that is something that can be set for plot([1e3,2e3]) as well. I have been browsing the examples, and tried the (for me) obvious things, but couldn't find the answer. Any help is appreciated, Mark -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] easy question on ytick label format
Thanks Zoltan. That sounds like an interesting video that I will watch. For now, does anybody know the answer? Mark On Fri, Jun 1, 2012 at 3:01 PM, Zoltán Vörös zvo...@gmail.com wrote: I think, you could just watch the video by John Hunter. He discusses these issues at length. http://marakana.com/s/advanced_matplotlib_tutorial_with_library_author_john_hunter,1133/index.html Cheers, Zoltná On 06/01/2012 02:58 PM, Mark Bakker wrote: Hello List, I want to plot plot([1000,2000]) Then on the y-axis, I want labels 1 and 2, and at the top of the y-axis I want E3. This works automatically with plot([1e7,2e7]). But I assume that is something that can be set for plot([1e3,2e3]) as well. I have been browsing the examples, and tried the (for me) obvious things, but couldn't find the answer. Any help is appreciated, Mark -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] easy question on ytick label format
Thanks. Easy and useful. On Fri, Jun 1, 2012 at 7:23 PM, Tony Yu tsy...@gmail.com wrote: On 06/01/2012 02:58 PM, Mark Bakker wrote: Hello List, I want to plot plot([1000,2000]) Then on the y-axis, I want labels 1 and 2, and at the top of the y-axis I want E3. This works automatically with plot([1e7,2e7]). But I assume that is something that can be set for plot([1e3,2e3]) as well. I have been browsing the examples, and tried the (for me) obvious things, but couldn't find the answer. Any help is appreciated, Mark Hi Mark, You can set the (exponent) limits at which scientific notation is activated: plt.ticklabel_format(scilimits=(-3, 3)) -Tony -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] question about example of override the default reporting of coords
I looked at the example of overriding the default reporting of coords, which is here: http://matplotlib.sourceforge.net/examples/pylab_examples/coords_report.html from pylab import * def millions(x): return '$%1.1fM' % (x*1e-6) x = rand(20) y = 1e7*rand(20) ax = subplot(111) ax.fmt_ydata = millions plot(x, y, 'o') show() I don't understand what the millions function does (with a $ and M ?). In fact, I get the exact same result when I delete the line ax.fmt_ydata = millions Any thoughts? -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] question about example of override the default reporting of coords
OK. Got it. That is not what I was looking for. But, why the leading $ sign? Just as an example? The $ sign shows up in the cursor coordinate now. Is that what was supposed to happen (it is confusing with the $ sign also being used for mathtext formatting, as you know). Thanks, Mark On Thu, May 31, 2012 at 3:49 PM, Tony Yu tsy...@gmail.com wrote: On Thu, May 31, 2012 at 9:31 AM, Mark Bakker mark...@gmail.com wrote: I looked at the example of overriding the default reporting of coords, which is here: http://matplotlib.sourceforge.net/examples/pylab_examples/coords_report.html from pylab import * def millions(x): return '$%1.1fM' % (x*1e-6) x = rand(20) y = 1e7*rand(20) ax = subplot(111) ax.fmt_ydata = millions plot(x, y, 'o') show() I don't understand what the millions function does (with a $ and M ?). In fact, I get the exact same result when I delete the line ax.fmt_ydata = millions Any thoughts? Hi Mark, It's a bit confusing, but there's actually two different types of formatters. You're most likely looking for major/minor tick formatters ( examplehttp://matplotlib.sourceforge.net/examples/api/engineering_formatter.html). In the above example, the *cursor coordinate* is reformatted. In an interactive window, you should see the current cursor position in the lower left (this may depend on the backend)---that's the value that should be reformatted by the `millions` function. Best, -Tony -- Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] numpy datetime64 plans?
Hello List, Does anybody know of any plans to include support for the new datetime64 data type in numpy? If this is the new numpy standard for doing dates and times, it would be great if it would work with plot_date, for example. Just wondering (but boy, would I do a little dance when all this datetime stuff is fully operational and integrated), Mark -- Special Offer -- Download ArcSight Logger for FREE! Finally, a world-class log management solution at an even better price-free! And you'll get a free Love Thy Logs t-shirt when you download Logger. Secure your free ArcSight Logger TODAY! http://p.sf.net/sfu/arcsisghtdev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] change default format of ticks on vertical axis
Works great Eric. Is this in the documentation somewhere? Thanks, Mark From: Eric Firing efir...@hawaii.edu On 03/07/2011 11:51 AM, Mark Bakker wrote: My values on the vertical axis are large, but the range is small: plot([3004,3005,3006]) By default this plots 0,1,2 as tickmarks along the vertical axis, and then at the top of the vertical axis is prints +3.005e3. I prefer to simply get 3004,3005,3006 at the tickmarks. If you are using a recent mpl, try following your plot command with ticklabel_format(useOffset=False) Eric -- What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] change default format of ticks on vertical axis
Hello List, My values on the vertical axis are large, but the range is small: plot([3004,3005,3006]) By default this plots 0,1,2 as tickmarks along the vertical axis, and then at the top of the vertical axis is prints +3.005e3. I prefer to simply get 3004,3005,3006 at the tickmarks. Any (easy) way I can change the default formatting? Sorry for the easy question, Mark -- What You Don't Know About Data Connectivity CAN Hurt You This paper provides an overview of data connectivity, details its effect on application quality, and explores various alternative solutions. http://p.sf.net/sfu/progress-d2d___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem with negative numbers on axes in EPS file when using in Latex file
Hello List, I have a pretty wacky problem. I create a figure which includes negative values along the y-axis: plot([-1,1]) for example. I save the figure as EPS. When I look at the figure with preview on my Mac it looks fine. When I import the figure in my Latex document the negative values disappear. My solution has been to use eps2eps on the eps file created by mpl, and this solves the problem. So apparently there is something not quite standard on the EPS file created by MPL. Is this a bug? I am running version 0.99.3 (Enthought dis) on a Mac running Leopard. Thanks for any suggestions, Mark -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] problem with negative numbers on axes in EPS file when using in Latex file
That works great. Never would have looked there. Thanks! Mark On Wed, Nov 10, 2010 at 2:27 PM, John Hunter jdh2...@gmail.com wrote: axes.unicode_minus : False -- The Next 800 Companies to Lead America's Growth: New Video Whitepaper David G. Thomson, author of the best-selling book Blueprint to a Billion shares his insights and actions to help propel your business during the next growth cycle. Listen Now! http://p.sf.net/sfu/SAP-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Axes3D figure to U3D
Hello List, Is there anybody who has tried to convert a Axes3D figure to U3D so it can be imbedded in a pdf file? It would be exceedingly cool. If anybody has code that can do this, that would be most excellent. If not, does anybody have any other thoughts on getting a 3D image in an interactive pdf file? Thanks, Mark -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] 3D output to pdf for animation?
Hello List, I know I may be hoping for too much, but is there a way to get the 3D figures into a file that may be converted to an animated pdf? Pdf now allows for inclusion of a 3D figure, and as far as I can see it needs to be in U3D or PRC format. Has anybody been successful converting any of the matplotlib output file types to U3D or PRC? Eventually I would like to add the figure in a Latex document and use movie15 to get a rotatable 3D images in my document. Thanks, Mark -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] bezier curve through set of 2D points
Hello List, Does matplotlib have a routine that can fit a cubic Bezier curve through an array of 2D points? I saw some Bezier routines in Path, but couldn't find what I am looking for. If matplotlib doesn't have it, does anybody have another suggestion in Python? Thanks, Mark -- Throughout its 18-year history, RSA Conference consistently attracts the world's best and brightest in the field, creating opportunities for Conference attendees to learn about information security's most important issues through interactions with peers, luminaries and emerging and established companies. http://p.sf.net/sfu/rsaconf-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] setting ticks on Axes3D
Hello list, I am trying to set ticks on an Axes3D plot. What I really want is, actually, not to have any ticks. For a 2D plot I set the ticks to an empty list. But in a 3D plot, I cannot set any ticks whatsover. At least not with a sequence. Any thoughts? from mpl_toolkits.mplot3d import Axes3D fig = figure() ax = Axes3D(fig) ax.plot([0,1],[0,1],[0,1]) # Now I want to set ticks: ax.set_xticks([]) # ax.set_xticks([.2,.3,.4]) # changes the scale of the figure, but not the ticks show() And the plot has ticks at .2 .4 .6 .8 on the x-axis. Thanks for any help, Mark -- This SF.Net email is sponsored by the Verizon Developer Community Take advantage of Verizon's best-in-class app development support A streamlined, 14 day to market process makes app distribution fast and easy Join now and get one step closer to millions of Verizon customers http://p.sf.net/sfu/verizon-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matplotlib with eclipse: how to get a graph?
Excellent. Many thanks.After all those years of using matplotlib, I finally find a use for show() Mark On Wed, Sep 23, 2009 at 11:02 PM, Gökhan Sever gokhanse...@gmail.comwrote: On Wed, Sep 23, 2009 at 3:51 PM, Mark Bakker mark...@gmail.com wrote: Hello list, I recently started using Eclipse with Pydev. I like it a lot but have not been able to get interactive plotting going (which otherwise works fine). My file is simple: from pylab import * ion() plot([1,2,3]) You need to issue a show() here. Thus the plotting window will hang on the screen until you close it. Eclipse Platform Version: 3.5.0 Build id: I20090611-1540 PyDev for Eclipse1.5.0.1251989166 org.python.pydev.feature.feature.group When I run this form within Eclipse, I do see a graphing window open up but then it disappears again when it is done, before I can even look at it. Any suggestions on how to keep the graphing window open? Thanks, Mark -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Gökhan -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] matplotlib with eclipse: how to get a graph?
Hello list, I recently started using Eclipse with Pydev. I like it a lot but have not been able to get interactive plotting going (which otherwise works fine). My file is simple: from pylab import * ion() plot([1,2,3]) When I run this form within Eclipse, I do see a graphing window open up but then it disappears again when it is done, before I can even look at it. Any suggestions on how to keep the graphing window open? Thanks, Mark -- Come build with us! The BlackBerryreg; Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9#45;12, 2009. Register now#33; http://p.sf.net/sfu/devconf___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to change yticks on colorbar?
Thanks Stan. I read the docs (which are quite nice), but couldn't find a way to set the ticks after the fact. But your method worked, Mark On Wed, Nov 5, 2008 at 4:00 PM, Stan West [EMAIL PROTECTED] wrote: *From:* Mark Bakker [mailto:[EMAIL PROTECTED] *Sent:* Wednesday, November 05, 2008 06:25 Hello list - I am trying to change the yticks on my colorbar (in combination with contourf) and cannot figure out how to do it. Short example: x,y = meshgrid(linspace(0,10),linspace(0,10)) a = contourf(x,y,x,linspace(0,10,6)) b = colorbar(a) This gives a nice colorbar, with ticks at 0,2,4,6,8,10 But I want labels only at 0,5,10. So I thought I can change that as: b.ax.set_yticks([0,5,10]) draw() But this gives really wacky results (totally messes up the colorbar), so that doesn't seem to be the way to do it. Can anybody tell me the correct way to do it? Thanks, Mark Try b = colorbar(a, ticks=linspace(0, 10, 3)) Documentation is at http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.colorbar . - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to change yticks on colorbar?
Hello list - I am trying to change the yticks on my colorbar (in combination with contourf) and cannot figure out how to do it. Short example: x,y = meshgrid(linspace(0,10),linspace(0,10)) a = contourf(x,y,x,linspace(0,10,6)) b = colorbar(a) This gives a nice colorbar, with ticks at 0,2,4,6,8,10 But I want labels only at 0,5,10. So I thought I can change that as: b.ax.set_yticks([0,5,10]) draw() But this gives really wacky results (totally messes up the colorbar), so that doesn't seem to be the way to do it. Can anybody tell me the correct way to do it? Thanks, Mark - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plans for data entry box widget?
Dear mpl developers - I recall there has been some discussion in the past on developing the ability to have a widget for entering data. I also recall that was not an easy thing to do. What's the current status? Doable? Thanks, Mark ps. The new website is really very nice! - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] How to end manually adding contour labels: Solved
Dear list - David Kaplan added a very cool new feature to add labels to a contour plots manually. Check out the ginput_manual_clabel.py example. I posted a question about this before, because I couldn't figure out how to end the manual selection of label positions. The doc string (and the example) says to press the middle mouse button or potentially both mouse buttons together. Many laptops don't have a middle mouse button. I have read that pushing both buttons together mimics the middle button on some machines. Not on mine or any others I have seen. The trick (at least on my machine) is to configure the touchpad such that some corner acts as the middle button. You can do that in the settings of the touchpad (on my XP laptop, under settings, control panel, mouse, then select device settings and settings; select tap zones and check to enable tap zones; then select which corner you want and select the action 'middle mouse button') I hope this works for everybody. Great new feature! Mark ps. I have asked David whether ending manual positions of labels could be done with the right mouse button instead. He's on vacation now, so we'll see what he says when he gets back. - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] bug in labeling contour lines
A little follow-up. When I use keyword argument inline=False, it doesn't remove the lines without a label. So it seems that when using inline=True the unlabeled contours get a white box, but no label (because it doesn't fit) which essentially removes the entire contour. Mark On Wed, Aug 6, 2008 at 2:27 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello list - There seems to be a bug in labeling contour lines. When I call clabel, it removes all contours that are not labeled (because the label doesn't fit on the section of contour, I presume). This seems like a bug to me (or a really odd feature). Easy example: x,y = meshgrid( linspace(-10,10,50), linspace(-10,10,50) ) z = log(x**2 + y**2) cobj = contour(x,y,z) cobj.clabel() a list of 8 text.Text objects draw() And now all contours without a label are gone. On my machine it draws labels on contours from 1 through 5, and erases the contours in the middle of the plot with values -2, -1, and 0. Mark - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] how to end manually positioning contour labels?
I just played with putting contour labels on manually (and interactively). It works fine by just left clicking on the spot where you want a label. But how do you end this feature? The doc string says: right click, or potentially click both mouse buttons together. Neither works for me on win32, mpl 0.98.3, TkAgg backend, interactive mode. Does this work for anybody? Mark Quick test: cobj = contour(x,y,z) # x,y,z some arrays cobj.clabel(manual=True) - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] plotting array with inf
I have a question about plotting an array with an inf. For example: y = np.array([2.,1.,0,1.,2.]) y = 1.0 / y So y is array([ 0.5, 1. , Inf, 1. , 0.5]) When I plot this, I get an error, of which the last line is: OverflowError: math range error I presume the problem is using the autoscale or something like that to set the data limits. But if I replace the Inf by a nan: y[2] = np.nan, then it plots fine. I know, I know, I can do this with masked arrays, but it cannot be that hard to make this work correctly, and wouldn't that be much nicer? Desirable? Mark - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100url=/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] APNG support?
I think APNG suppot woudl be very cool. Would it be hard to write a simple Python script that creates an APNG file from a set of PNG files? That would be really killer. Just as important, I was wondering what programs support APNG. It works fine in my Firefox 3, but I also need it in some presentation software (Powerpoint, OpenOffice Impress). Anybody know how that is going? Mark Date: Tue, 1 Jul 2008 01:41:32 -0400 From: Alan G Isaac [EMAIL PROTECTED] Someone said: http://matplotlib.sourceforge.net/faq.html#MOVIE OK, this works. But might it be a possible goal for Matplotlib to be able to assemble these PNGs into an APNG? URL:http://wiki.mozilla.org/APNG_Specification Until then, this can be done with a FireFox 3 extension: URL:https://addons.mozilla.org/en-US/firefox/addon/5519 Cheers, Alan Isaac - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Easy question: how to select specific subplot for second (or more) time
Hello list - I want to plot something in two subplots, then add something to the first subplot. How do I select the first subplot after I have plotted on the second subplot? For example: subplot(211) plot([1,2,3]) subplot(212) plot([4,3,2]) Now I want to add something to the first subplot. So I thought I could do subplot(211) again, but that destroys the subplot. Any suggestions? Thanks, Mark - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Easy question: how to select specific subplot for second (or more) time
Thanks Tony - I was hoping there was a plyab-ish command. Like you can do Figure(1), Figure(2), and then reselect Figure(1) to get access to the first figure. No such command for subplot, I understand. Cheers, Mark On Tue, Jun 10, 2008 at 3:27 PM, Tony S Yu [EMAIL PROTECTED] wrote: Wow, a question I can actually answer: ax1 = subplot(211) ax2 = subplot(212) ax1.plot([1,2,3]) ax2.plot([4,3,2]) ax1.plot([3,2,1]) Best, -Tony On Jun 10, 2008, at 9:09 AM, Mark Bakker wrote: Hello list - I want to plot something in two subplots, then add something to the first subplot. How do I select the first subplot after I have plotted on the second subplot? For example: subplot(211) plot([1,2,3]) subplot(212) plot([4,3,2]) Now I want to add something to the first subplot. So I thought I could do subplot(211) again, but that destroys the subplot. Any suggestions? Thanks, Mark - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Easy question: how to select specific subplot for second (or more) time
Yep, that works. I thought I had tried that, but I must have done something wrong. Sorry for the clutter, Mark On Tue, Jun 10, 2008 at 4:00 PM, John Hunter [EMAIL PROTECTED] wrote: On Tue, Jun 10, 2008 at 8:41 AM, Tony S Yu [EMAIL PROTECTED] wrote: Hey Mark, Actually, recalling subplot(211) seems to work for me. Strange. Yes, this is the expected behavior, you can reactivate any axes or subplot by simply making the same axes or subplot call (with the same arguments). This is discussed in the pylab tutorial section working with multiple figures and axes at http://matplotlib.sourceforge.net/tutorial.html#figs_and_axes JDH - Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] can any windows 0.91.2 user reproduce
I know. In version 0.90.1 (and earlier) all greek symbols were included in the EPS. Now they are not anymore, and I cannot get any of the options to include them. Does anybody know how to fix this? Mark Date: Tue, 25 Mar 2008 10:43:43 -0400 From: Alan G Isaac [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] can any windows 0.91.2 user reproduce thisbug? To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: TEXT/PLAIN; CHARSET=ISO-8859-1 On Tue, 25 Mar 2008, Jim Vickroy apparently wrote: I loaded the eps file in Adobe Photoshop and the chi letter **was** displayed along the x-axis. -- jv Sounds like perhaps the symbol is not embedded in the EPS file. Cheers, Alan Isaac - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] can any windows 0.91.2 user reproduce
John - What you are saying makes sense, because whatever option I give, I always get Vera included in my eps file but nothing else. Thanks for looking into this, Mark On Tue, Mar 25, 2008 at 6:50 PM, John Hunter [EMAIL PROTECTED] wrote: On Tue, Mar 25, 2008 at 12:02 PM, Michael Droettboom [EMAIL PROTECTED] wrote: The *intention* is that the fonts *should* be included (with the exception of ps.useafm == True). That was definitely not a deliberate change. However, as one of the ones who hasn't been able to reproduce this problem, I'm afraid I'm not of much help. From reading the code, I'm still completely stumped as to why the font is not embedded. Someone will have to step through with a debugger on one of the broken systems to figure this out, I'm afraid. I was able to replicate the bug and find the source of the problem. I am not 100% sure how to fix it, but someone who knows os.stat better might. The problem is that matplotlib.cbook.get_realpath_and_stat class GetRealpathAndStat: def __init__(self): self._cache = {} def __call__(self, path): result = self._cache.get(path) if result is None: realpath = os.path.realpath(path) stat = os.stat(realpath) stat_key = (stat.st_ino, stat.st_dev) result = realpath, stat_key self._cache[path] = result return result get_realpath_and_stat = GetRealpathAndStat() is returning the same stat ino and dev for all the font files, and thus the renderer.used_characters dictionary is getting improper keys -- always (0,0). So the first font in the gate, in this case Vera, is getting a place in the dict and subsequent fonts (the cm* ones) are not. The basic problem is that the inode and dev appear to be unix only. Michael: if you let me know better what this key is supposed to be doing (can we not simply use the filename for windows?) then I can attempt or test some fixes. JDH - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug exporting mathtext to eps file in 0.91.2 on windows
I have confirmed that it is a bug in (at least the windows version) of mpl 0.91.2. When saving eps files, and using mathtext, the cm fonts don't get saved, and the greek symbols (and others I presume) don't show up in the eps file. This works in mpl 0.90.1, where the eps file does store the fonts. %%BeginFont: Cmmi10 When running the same problem with 0.91.2, the fonts are not stored. Either using ps.fonttype 3 or 42. Anybody who can fix this? Thanks, Mark On Wed, Mar 19, 2008 at 11:21 AM, Bernhard Voigt [EMAIL PROTECTED] wrote: Hi Mark! The problem seems to be that the computer modern font (cm) is not included in the eps file. The snipped of the eps file I sent before defines the font cmmi10: %!PS-Adobe-3.0 Resource-Font %%Title: cmmi10 %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights Reserved.012BaKoMa Fonts Colle ction, Level-B. %%Creator: Converted from TrueType by PPR . /FontName /Cmmi10 def And later, when the \chi glyph should be drawn, the font is changed to: /Cmmi10 findfont 16.0 scalefont setfont 0.00 4.921875 moveto /chi glyphshow Which is the same in your file, but your file only contains the Bitstreem Vera Sans font for the axis ticks. Cmmi10 is missing :-( Your pdf, however, does contain the cmmi10 font, you can check via file-properties-fonts. You should have the following in your matplotlibrc file (well, you said you have it, but let me repeat): mathtext.fontset : cm mathtext.fallback_to_cm : True ps.useafm : False ps.fonttype : 3 Check the settings using the interpreter prompt: In [10]: p.rcParams['mathtext.fontset'] Out[10]: 'cm' etc... Well, if they are all correctly set, it's probably a bug in the ps backend not including the mathtext font. A workaround would be to convert the pdf file to ps (either use command line options of acroread or print to file), edit the ps file to be a eps by changing the header to %!PS-Adobe-2.0 EPSF-2.0 and make sure the bounding box is specified (see http://www.postscript.org/FAQs/language/node82.html for details) Bernhard On Wed, Mar 19, 2008 at 10:22 AM, Mark Bakker [EMAIL PROTECTED] wrote: Hello Mike - Thanks for taking a look at this. Easy example: from pylab import * plot([1,2,3]) text(1,1.5,r'$\chi$') savefig('d:/temp/test.eps') There shoud now be a line and the symbol chi. Works great in the pdf file, not in the eps file. Both are attached. Strangely enough at the end of the eps file there are statements: 0.00 3.703125 moveto /chi glyphshow Which looks to me like writing chi. I have now tried this on 4 windows machines, with different installations of gsview, but it doesn't work on any. It works fine under mpl vs. 0.90.1. That has the same statement for chi, but defines chi internally inside the eps file (which is much bigger). Thanks, Mark On Tue, Mar 18, 2008 at 7:09 PM, mdroe [EMAIL PROTECTED] wrote: It looks like it may be Windows-specific. I can create .eps files with math on mpl-0.91.2, Python 2.5, gs-7.07 on Linux without problems. Someone with a Windows installation may need to look at this. Just so I can have a deeper look -- can you please attach a) the Python source of a minimal plot that causes this problem b) your .eps file output (so I can compare it against mine). Mike - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Bug exporting mathtext to eps file in 0.91.2 on windows
Sorry, John, but here is my output, and it still doesn't work. from pylab import * rcParams['mathtext.fontset'] 'cm' rcParams['mathtext.fallback_to_cm'] True rcParams['ps.useafm'] False rcParams['ps.fonttype'] 3 plot([1,2,3]) [matplotlib.lines.Line2D instance at 0x029F0120] text(1,1.5,r'$\chi$') matplotlib.text.Text instance at 0x029F6968 savefig('c:/temp/test.eps') On the same machine, I get the correct eps file with 0.90.1. So it really isn't my installation of GsView. In the eps file created with 0.91.2, the cm fonts are not included, which I think is causing the problem. What happens when you guys read the attached eps file (created with commands above)? Do you see the chi symbol on the screen? Thanks for looking into this, Mark On Wed, Mar 19, 2008 at 2:18 PM, John Hunter [EMAIL PROTECTED] wrote: On Wed, Mar 19, 2008 at 7:43 AM, Mark Bakker [EMAIL PROTECTED] wrote: I have confirmed that it is a bug in (at least the windows version) of mpl 0.91.2. When saving eps files, and using mathtext, the cm fonts don't get saved, and the greek symbols (and others I presume) don't show up in the eps file. This works in mpl 0.90.1, where the eps file does store the fonts. %%BeginFont: Cmmi10 When running the same problem with 0.91.2, the fonts are not stored. Either using ps.fonttype 3 or 42. Anybody who can fix this? My guess is that you are picking up an rc file where useafm is set to True. Michael suggested checking this rc setting but I did not see any response on this on list. Have you checked it? In the script that is causing you trouble, print out the value import matplotlib print 'afm setting', matplotlib.rcParams['ps.useafm'] If this is True, then you need to find your matplotlibrc file and set it to False. I can't imagine a windows vs other platform issue that could cause this since we do not use only matplotlib tools in our font conversion pipeline JDH test.eps Description: PostScript document - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Repost: problem exporting mathtext to eps file in 0.91.2
Hello Bernhard - When I set the fonttype to 42, the eps file gets much bigger, and the fonts seem included. The file contains the same section as yours: %!PS-TrueTypeFont-1.0-2.0 %%Title: Bitstream Vera Sans %%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. %%Creator: Converted from TrueType to type 42 by PPR But still, my eps file doesn't contain the greek letter. Strangely enough, when I read the epa file, there is a line that says 0.00 3.703125 moveto /chi glyphshow Could it be that I have a ghostview problem? It works with the old mpl, but maybe I need to upgrade? I am using version 4.4. BTW, pdf works fine, it is only eps that gives me trouble. Mark On Tue, Mar 18, 2008 at 3:47 PM, Bernhard Voigt [EMAIL PROTECTED] wrote: hi again! did you look into the eps file, do you see that the font is included, eg. i have something like that in my eps files (still in the header section): %!PS-Adobe-3.0 Resource-Font %%Title: cmmi10 %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights Reserved.012BaKoMa Fonts Collection, Level-B. %%Creator: Converted from TrueType by PPR did you try saving the file as pdf? does this work? check the file properties (file menu - properties) and the fonts included in the file. that would at least show that the font is at least included, or not good luck! bernhard ps: if pdf works, it would be easy to convert to eps... On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello Bernhard and others - I tried all the options, but nothing works. Whenever I type a greek symbol in mathtext and save the figure as eps, the greek symbols don't show up. Confirmed on several windows machines. Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody else have this problem? It is starting to look like a bug. Thanks, Mark On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt [EMAIL PROTECTED] wrote: what are the values of pdf and ps fonttype in your rc file? try using this: ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) this includes the missing symbols into the ps/pdf file, if you choose type 42 the complete font will be inserted in the resulting file. in addition check the mathtext.fontset setting, try using stix or cm: mathtext.fontset: cm best wishes, bernhard On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello - I am trying this again. I recently upgraded to 0.91.2, and export of mathtext to eps files seems broken (at least with the default matplotlibrc file). Figure looks great on the screen (interactive mode). Exporting to png still works fine. But writing to eps file, the greek symbols (I tried \theta and \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very ugly (different font than used to). Any suggestions? Anybody seenig the same behavior? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Repost: problem exporting mathtext to eps file in 0.91.2
Just upgraded to Ghostview 4.9 with Ghostscript 8.61, but it still doesn't work. Does anybody see greek symbols in eps files with mpl 0.92.1? Mark On Tue, Mar 18, 2008 at 5:07 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello Bernhard - When I set the fonttype to 42, the eps file gets much bigger, and the fonts seem included. The file contains the same section as yours: %!PS-TrueTypeFont-1.0-2.0 %%Title: Bitstream Vera Sans %%Copyright: Copyright (c) 2003 by Bitstream, Inc. All Rights Reserved. %%Creator: Converted from TrueType to type 42 by PPR But still, my eps file doesn't contain the greek letter. Strangely enough, when I read the epa file, there is a line that says 0.00 3.703125 moveto /chi glyphshow Could it be that I have a ghostview problem? It works with the old mpl, but maybe I need to upgrade? I am using version 4.4. BTW, pdf works fine, it is only eps that gives me trouble. Mark On Tue, Mar 18, 2008 at 3:47 PM, Bernhard Voigt [EMAIL PROTECTED] wrote: hi again! did you look into the eps file, do you see that the font is included, eg. i have something like that in my eps files (still in the header section): %!PS-Adobe-3.0 Resource-Font %%Title: cmmi10 %%Copyright: Copyright (C) 1994, Basil K. Malyshev. All Rights Reserved.012BaKoMa Fonts Collection, Level-B. %%Creator: Converted from TrueType by PPR did you try saving the file as pdf? does this work? check the file properties (file menu - properties) and the fonts included in the file. that would at least show that the font is at least included, or not good luck! bernhard ps: if pdf works, it would be easy to convert to eps... On Mon, Mar 17, 2008 at 5:50 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello Bernhard and others - I tried all the options, but nothing works. Whenever I type a greek symbol in mathtext and save the figure as eps, the greek symbols don't show up. Confirmed on several windows machines. Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody else have this problem? It is starting to look like a bug. Thanks, Mark On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt [EMAIL PROTECTED] wrote: what are the values of pdf and ps fonttype in your rc file? try using this: ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) this includes the missing symbols into the ps/pdf file, if you choose type 42 the complete font will be inserted in the resulting file. in addition check the mathtext.fontset setting, try using stix or cm: mathtext.fontset: cm best wishes, bernhard On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello - I am trying this again. I recently upgraded to 0.91.2, and export of mathtext to eps files seems broken (at least with the default matplotlibrc file). Figure looks great on the screen (interactive mode). Exporting to png still works fine. But writing to eps file, the greek symbols (I tried \theta and \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very ugly (different font than used to). Any suggestions? Anybody seenig the same behavior? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Repost: problem exporting mathtext to eps file in 0.91.2
Hello Bernhard and others - I tried all the options, but nothing works. Whenever I type a greek symbol in mathtext and save the figure as eps, the greek symbols don't show up. Confirmed on several windows machines. Python 2.4. mpl 0.91.2. (but it worked fine under 0.90.1). Does anybody else have this problem? It is starting to look like a bug. Thanks, Mark On Fri, Mar 14, 2008 at 5:06 PM, Bernhard Voigt [EMAIL PROTECTED] wrote: what are the values of pdf and ps fonttype in your rc file? try using this: ps.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) pdf.fonttype : 3 # Output Type 3 (Type3) or Type 42 (TrueType) this includes the missing symbols into the ps/pdf file, if you choose type 42 the complete font will be inserted in the resulting file. in addition check the mathtext.fontset setting, try using stix or cm: mathtext.fontset: cm best wishes, bernhard On Fri, Mar 14, 2008 at 2:15 PM, Mark Bakker [EMAIL PROTECTED] wrote: Hello - I am trying this again. I recently upgraded to 0.91.2, and export of mathtext to eps files seems broken (at least with the default matplotlibrc file). Figure looks great on the screen (interactive mode). Exporting to png still works fine. But writing to eps file, the greek symbols (I tried \theta and \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very ugly (different font than used to). Any suggestions? Anybody seenig the same behavior? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Repost: problem exporting mathtext to eps file in 0.91.2
Hello - I am trying this again. I recently upgraded to 0.91.2, and export of mathtext to eps files seems broken (at least with the default matplotlibrc file). Figure looks great on the screen (interactive mode). Exporting to png still works fine. But writing to eps file, the greek symbols (I tried \theta and \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very ugly (different font than used to). Any suggestions? Anybody seenig the same behavior? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem exporting mathtext to eps file in 0.91.2
Hello - I recently upgraded to 0.91.2, and export of mathtext to eps files seems broken (at least with the default matplotlibrc file). Figure looks great on the screen (interactive mode). Exporting to png still works fine. But writing to eps file, the greek symbols (I tried \theta and \lambda) don't show up at all, while the latin symbols (a,b,c,etc) look very ugly (different font than used to). Any suggestions? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] strangely shifted PostScript output when
As a workaround, can you just turn the axis box and ticks off? xticks([]) yticks([]) setp(ax,'frame_on',False) Or does that give the same problem? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] aspect_ratio in combination with sharex
On Feb 11, 2008 2:35 PM, Michael Droettboom [EMAIL PROTECTED] wrote: Before I look into this further: what version of mpl are you using? I am using 0.91.2 using the win32 installer for Python 2.4. Thanks for looking into this, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to get current value of xlim/ylim?
Hello Heiko - dir(graph) would at least have given you a list of the functions and attributes, so you may have been able to spot the get_xlim function. I use that a lot, Mark -- Date: Mon, 11 Feb 2008 14:14:03 +0100 From: Slackenerny [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] How to get current value of xlim/ylim? To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-15 Hi, I could help myself with graph.get_xlim() which I found after finally guessing the right expressions for Google, but I wonder how I could have found it in the help() output... I've been searching that for quite sometime and didn't come up with anything... So, how could I have helped myself, without annoying you? ;) best wishes - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] aspect_ratio in combination with sharex
Hello - I have a hard time getting aspect_ratio to work correctly with sharex. This used to work quite a while ago, and has been broken for a long time (or at least I don't know how to get it to work) But I finally found the time to put a simple example together to determine if I do something wrong, or whether this can be fixed easily. When I make a small contour plot setting the aspect ratio equal works fine: from pylab import * x,y = meshgrid(linspace(0,5,5),linspace(0,5,5)) figure() ax = subplot(211) ax.contour(x,y,x) ax.set_aspect('equal',adjustable='datalim') draw() Note that the datalim on the x-axis is expanded, as the data limit on the y-axis is the determining factor. If I now try to do the same thing while linking the x-axis of a second subplot to the first one, then the same call to set_aspect changes the data limit on the y-axis while keeping the x-axis fixed. That seems inconsistent and is not the behavior I want: figure() ax = subplot(211) ax.contour(x,y,x) ax2 = subplot(212,sharex=ax) ax.set_aspect('equal',adjustable='datalim') draw() Any idea what I am doing wrong? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] aspect_ratio in combination with sharex
I seem to have tracked down the problem. After calling the aspect_ratio function, the data limits don't get set. When a new axis with sharex is called, it gets the old data limits. After I call draw() or ax.draw() the datalimit gets set correctly. And creating a subplot with sharex works fine. Maybe the datalimit needs to be set at the end of the aspect_ratio function? (I presume that is part of the draw() command) Mark from pylab import * x,y = meshgrid(linspace(0,5,5),linspace(0,5,5)) figure() ax = subplot(211) ax.contour(x,y,x) ax.set_aspect('equal',adjustable='datalim') print ax.get_xlim() # Prints 0 to 5 while datalimit is much larger draw() print ax.get_xlim() # Now datalimit is correct and sharex works ax2 = subplot(212,sharex=ax) draw() On Feb 11, 2008 9:56 AM, Mark Bakker [EMAIL PROTECTED] wrote: Hello - I have a hard time getting aspect_ratio to work correctly with sharex. This used to work quite a while ago, and has been broken for a long time (or at least I don't know how to get it to work) But I finally found the time to put a simple example together to determine if I do something wrong, or whether this can be fixed easily. When I make a small contour plot setting the aspect ratio equal works fine: from pylab import * x,y = meshgrid(linspace(0,5,5),linspace(0,5,5)) figure() ax = subplot(211) ax.contour(x,y,x) ax.set_aspect('equal',adjustable='datalim') draw() Note that the datalim on the x-axis is expanded, as the data limit on the y-axis is the determining factor. If I now try to do the same thing while linking the x-axis of a second subplot to the first one, then the same call to set_aspect changes the data limit on the y-axis while keeping the x-axis fixed. That seems inconsistent and is not the behavior I want: figure() ax = subplot(211) ax.contour(x,y,x) ax2 = subplot(212,sharex=ax) ax.set_aspect('equal',adjustable='datalim') draw() Any idea what I am doing wrong? Thanks, Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Can I change placement of X-Axis?
John - My version of mpl (0.90.1) only has a function ax.xaxis.get_ticklocs(), not ax.xaxis.get_majorticklocs(). New feature? Mark On Feb 2, 2008 10:27 PM, John Hunter wrote: Send Matplotlib-users mailing list submissions to matplotlib-users@lists.sourceforge.net To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/matplotlib-users or, via email, send a message with subject or body 'help' to [EMAIL PROTECTED] You can reach the person managing the list at [EMAIL PROTECTED] When replying, please edit your Subject line so it is more specific than Re: Contents of Matplotlib-users digest... Today's Topics: 1. Re: Can I change placement of X-Axis? (John Hunter) -- Message: 1 Date: Sat, 2 Feb 2008 15:27:52 -0600 From: John Hunter [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] Can I change placement of X-Axis? To: Eric Firing [EMAIL PROTECTED] Cc: volcs0 [EMAIL PROTECTED], matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=iso-8859-1 On Feb 2, 2008 3:06 PM, Eric Firing [EMAIL PROTECTED] wrote: volcs0 wrote: I saw one post related to arbitrary axis positioning from 2005, but there was no solution. It is still on the wish list. Though with a little hacking, you can emulate it by manually drawing everything yourself -- this is the approach SAGE takes. Eg, import numpy as np from pylab import figure, show import matplotlib.lines as lines def make_xaxis(ax, yloc, offset=0.05, **props): xmin, xmax = ax.get_xlim() locs = [loc for loc in ax.xaxis.get_majorticklocs() if loc=xmin and loc=xmax] tickline, = ax.plot(locs, [yloc]*len(locs),linestyle='', marker=lines.TICKDOWN, **props) axline, = ax.plot([xmin, xmax], [yloc, yloc], **props) tickline.set_clip_on(False) axline.set_clip_on(False) for loc in locs: ax.text(loc, yloc-offset, '%1.1f'%loc, horizontalalignment='center', verticalalignment='top') def make_yaxis(ax, xloc=0, offset=0.05, **props): ymin, ymax = ax.get_ylim() locs = [loc for loc in ax.yaxis.get_majorticklocs() if loc=ymin and loc=ymax] tickline, = ax.plot([xloc]*len(locs), locs, linestyle='', marker=lines.TICKLEFT, **props) axline, = ax.plot([xloc, xloc], [ymin, ymax], **props) tickline.set_clip_on(False) axline.set_clip_on(False) for loc in locs: ax.text(xloc-offset, loc, '%1.1f'%loc, verticalalignment='center', horizontalalignment='right') props = dict(color='black', linewidth=2, markeredgewidth=2) x = np.arange(200.) y = np.sin(2*np.pi*x/200.) + np.random.rand(200)-0.5 fig = figure(facecolor='white') ax = fig.add_subplot(111, frame_on=False) ax.axison = False ax.plot(x, y, 'd', markersize=8, markerfacecolor='blue') ax.set_xlim(0, 200) ax.set_ylim(-1.5, 1.5) make_xaxis(ax, 0, offset=0.1, **props) make_yaxis(ax, 0, offset=5, **props) fig.savefig('manual_axis.png', dpi=100, facecolor='white', edgecolor='white') show() -- next part -- A non-text attachment was scrubbed... Name: test.py Type: application/octet-stream Size: 1691 bytes Desc: not available -- next part -- A non-text attachment was scrubbed... Name: manual_axis.png Type: image/png Size: 35563 bytes Desc: not available -- - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest, Vol 21, Issue 5 *** - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] dashes and dpi?
Alan - You started a discussion about dpi on the figures. Yet here you claim that 1pt = 1/72 inch. Is that always the case? And why? How does mpl figure that out, if there are also different dpi settings? The plot thickens... Mark Alan Isaac wrote: Note: 1pt = 1/72 inch hth, Alan Isaac - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] labeling contours with roman numerals
Michael - This trick for replacing contour labels with a string was posted a little while back (by someone else):* * class FormatFaker(object): def __init__(self, str): self.str = str def __mod__(self, stuff): return self.str A=arange(100).reshape(10,10) CS=contour(A,[50,]) CS.clabel(fmt=FormatFaker('Some String')) From: Michael Hearne [EMAIL PROTECTED] Subject: [Matplotlib-users] labeling contours with roman numerals To: Matplotlib Users matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Does a LineCollection generated by contour() have a property that holds the labels? I would like to label my contour lines with roman numerals, and cannot figure out how to get clabel to do that. Thanks, Mike - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] labeling contours with roman numerals
I would guess: CS=contour(A,[50,]) CS.clabel(fmt=FormatFaker('I')) # Labels contour 50 with I CS=contour(A,[60,]) CS.clabel(fmt=FormatFaker('II')) # Labels contour 60 with II Or write a loop if you have many values. Mark On Dec 14, 2007 11:44 PM, Michael Hearne [EMAIL PROTECTED] wrote: I've seen this, but I'm not clever enough to see how to extend that to multiple levels - after all, I don't want to label every line with the same string... --Mike On Dec 14, 2007, at 3:20 PM, Mark Bakker wrote: Michael - This trick for replacing contour labels with a string was posted a little while back (by someone else):* * class FormatFaker(object): def __init__(self, str): self.str = str def __mod__(self, stuff): return self.str A=arange(100).reshape(10,10) CS=contour(A,[50,]) CS.clabel(fmt=FormatFaker('Some String')) From: Michael Hearne [EMAIL PROTECTED] Subject: [Matplotlib-users] labeling contours with roman numerals To: Matplotlib Users matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=us-ascii Does a LineCollection generated by contour() have a property that holds the labels? I would like to label my contour lines with roman numerals, and cannot figure out how to get clabel to do that. Thanks, Mike -- Michael Hearne [EMAIL PROTECTED] (303) 273-8620 USGS National Earthquake Information Center 1711 Illinois St. Golden CO 80401 Senior Software Engineer Synergetics, Inc. -- - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] new location of home.ppm
Hello - It seems that in the latest version (0.9.1) the location of the images, such as home.ppm, has moved to a new directory. It used to be in ...\mpl-data and now it is in ...\mpl-data\images This totally breaks my code, as I use my own toolbar that uses these images, with a hardcoded location of the ppm files. I know, I should from now on distribute these ppm files with the distribution of my own program, but there may be others that have this problem. Not sure what the best solution is. WIll it remain in this new images directory from now on? Thanks, Mark ps. Cross-posted on the users and development list ps2. Sorry, it sounds like I am bitching, but I really like matplotlib. Just needed to point out this backwards incompatibility, which may just be ugly coding on my part - SF.Net email is sponsored by: Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] After saving in GUI, how can I get the oo-interface?
Well, that is very odd. Do Tk and GTK have the same problem? Was this known? Is there a more substantial problem here than a backend problem? Mark On Nov 24, 2007 11:31 AM, Arnar Flatberg [EMAIL PROTECTED] wrote: Actually, I am using the GTK (Agg) backend. But thanks for replying. Arnar On Nov 23, 2007 9:00 PM, Mark Bakker [EMAIL PROTECTED] wrote: Arnar - I presume you are using Tk. This is a known bug under Tk, that is apparently difficult to solve. John Hunter looked into it a year back or so, but couldn't find help from Tk experts that may know the solution. Oddly enough, I have written my own GUI in Tk, where I modified the toolbar, and I don't have the problem. If this could be solved, I would be very happy, Mark From: Arnar Flatberg [EMAIL PROTECTED] Subject: [Matplotlib-users] After saving in GUI,how can I get the oo-interface? To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi list It looks like I cant change any properties of a matplotlib figure/axis after I saved the figure using the GUI. At least I cant use gca(), and gcf(). It works fine if the save (e.g., figure.savefig('foo')) was performed in the oo interface Does anybody else have a problem with this (code below)? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Installation of Python/mpl/numpy/scipy/Ipython for students
A question was posted a week or so ago on the scipy list about installing Python/mpl/numpy/scipy/Ipython by David Arnold (both Windows and Mac). He was interested in a simple install for students (and others that are less computer-savy). We had a little off-list correspondence, but thought to bring it back to the list, also posting on mpl (cause I read that list and it seems pretty responsive) and the numpy Google discussion group (they respond VERY quickly). On the scipy list it was suggested to use Sage reply, but that sounds like a little overkill to me. I have used the enthought package on windows successfully in class in the past, but I understand that they have now switched to eggs, which is not convenient (yet). I also don't like all the other things I have to set myself. A switch on the IDLE GUI to get mpl to work interactively (which is now seems impossible to do), and setting my PYTHONPATH with environment variables. It is all easy to do, but not for students, especially students without much knowledge of how computers work let alone access to set these variables and options. At one point I was reading about making a superpack (or a name like that) installation for Python with our favorite packages as mentioned above. I am not sure where that is going. Are others dreaming about such a superpack? What needs to be done to get it going? Mark - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] After saving in GUI, how can I get the oo-interface?
Arnar - I presume you are using Tk. This is a known bug under Tk, that is apparently difficult to solve. John Hunter looked into it a year back or so, but couldn't find help from Tk experts that may know the solution. Oddly enough, I have written my own GUI in Tk, where I modified the toolbar, and I don't have the problem. If this could be solved, I would be very happy, Mark From: Arnar Flatberg [EMAIL PROTECTED] Subject: [Matplotlib-users] After saving in GUI,how can I get the oo-interface? To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1 Hi list It looks like I cant change any properties of a matplotlib figure/axis after I saved the figure using the GUI. At least I cant use gca(), and gcf(). It works fine if the save (e.g., figure.savefig('foo')) was performed in the oo interface Does anybody else have a problem with this (code below)? - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] saving figures
Erik - You write that adding a 'save' is difficult. I can see it is involved, but don't quite see how it is specifically difficult. The way I see it, every item that is added to a figure needs a method to write itself to a file. So you loop through all lines, polygons, and such, and write them to a file. I am sure you guys have thought about this, and maybe have a much better approach. Is this something that is on the to-do or wish list? Maybe not top priority, but it would sure be nice, Thanks, Mark Jordan Atlas wrote: Hello, Is it possible to 'save' a matplotlib figure object using something like the python pickle module? Basically, I'd like to save the 'figure' as a file so that I can open it and manipulate it if something is wrong. Alternative suggestions are welcome. Thank you, --Jordan Atlas Jordan, No, this has been requested before but it is not an easy modification of mpl to make. The alternative suggestion is to always encapsulate the making of a figure in a script, and then save the script and the data. If you want to save the combination in a single file, then arrange for the script and data to reside in a single subdirectory, and zip or tar that subdirectory. Eric - This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] inconsistency in LineCollection
Hello - I got confused about specifying colors and linewidths for LineCollections. I think it would be helpful if the docstrings explicitly state that they should be sequences. I know, they do in some way, but it i Maybe we should even check this on input, as the error message you get when you don't do that is confusing. Let me explain: from pylab import * from matplotlib.collections import LineCollection ax = subplot(111) ax.add_collection( LineCollection( [[(0,0),(1,1)]], colors='r' ) ) draw() This works fine, as apparantly colors='r' is interpreted as a sequence. This does not work, however: ax.add_collection( LineCollection( [[(0,0),(1,1)]], colors='r', linewidths=2 ) ) draw() Now I get an error: TypeError: CXX: type error. That's not too helpful. What does work is ax.add_collection( LineCollection( [[(0,0),(1,1)]], colors='r', linewidths=[2] ) ) draw() Maybe the confusing part is that just specifying colors='r' works. Thanks, Mark ps. I do all the draws as I am in interactive mode. - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] basic understanding of plotting dates
Hey Che - If you include your graphs in a wxPython app, you shouldn't use pylab. Pylab is a wrapper to (quickly) generate graphs, and is very useful, especially in interactive mode, as it saves a lot of typing and is much easier to understand (indeed, a lot like matlab plotting). But for inclusion in apps you need to use matplotlib, so you are on the right track. This has been discussed several times on the list, but it may not be so easy to find. Maybe we should put this on the FAQ page (or maybe it is already there!), Mark On 9/4/07, C M [EMAIL PROTECTED] wrote: Mark, Mark, Brendan, John, thanks for the input. I have a related question that may help to continue to clear things up for me. My goal is to use matplotlib with wxPython, and I've been able to embed graphs in wxPython apps fine so far (in this case, directly, not using wxMPL). What I wanted to know is whether it is necessary to use pylab or not. I am a little unclear what the purpose of pylab is in distinction to matplotlib itself. I gather that pylab is a way to sort of emulate Matlab, but I am unclear as to whether I need to be using pylab in my apps or not. I am not doing scientific plots, just fairly simple graphs, though I may throw some regression lines and r values on there at some point. I really just want to keep things as simple as possible, and if I don't need to use pylab, I'd rather not. Any insight would be helpful. Thank you. Che M On 9/4/07, Mark Bakker [EMAIL PROTECTED] wrote: Maybe this will get you going: import pylab as p import datetime as d from matplotlib.dates import DateFormatter t = [ d.datetime (2007,9,1,12), d.datetime(2007,9,2,12), d.datetime(2007,9,3,12) ] t = p.date2num(t) p.plot_date( t, [10,20,30] ) p.xticks(t) y = DateFormatter('%Y-%m-%d') p.gca().xaxis.set_major_formatter(y) p.draw() Mark From: C M [EMAIL PROTECTED] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30) - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] basic understanding of plotting dates
Maybe this will get you going: import pylab as p import datetime as d from matplotlib.dates import DateFormatter t = [ d.datetime (2007,9,1,12), d.datetime(2007,9,2,12), d.datetime(2007,9,3,12) ] t = p.date2num(t) p.plot_date( t, [10,20,30] ) p.xticks(t) y = DateFormatter('%Y-%m-%d') p.gca().xaxis.set_major_formatter(y) p.draw() Mark From: C M [EMAIL PROTECTED] Subject: [Matplotlib-users] basic understanding of plotting dates x = (2007-09-01 12:00:02, 2007-09-02 12:00:02, 2007-09-03 12:00:02) y = (10, 20, 30) - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting images side by side
I use TkAgg on win32, and saw the line on screen and in png and eps files. I tried nudging it, but that didn't work either. So I tried the following overlap and still saw the line: a = ones((10,10)) imshow(a,extent=(0.0,11.0,0.0,10.0)) imshow(a,extent=(10.0,20.0,0.0,10.0)) axis((0,20,0,10)) So I figured it had to do with the interpolation. I used the default interpolation ('bilinear'). When I do the above overlap with interpolation set to 'nearest', I don't get the line! What interpolation were you using? Thanks for your help, Mark On 8/21/07, Eric Firing [EMAIL PROTECTED] wrote: Mark, What backend? I don't see it when I run your lines in ipython -pylab, with gtkagg in use (linux). Have you tried using floating point extents and fudging them very slightly to overlap? Eric Mark Bakker wrote: Hello all - I am trying to plot two images side byside. The problem is that I get a white line between them. Even when the extent of the two images are exactly next to eachother. Does anybody know how to get rid of the white line? Here's an easy example: from pylab import * a = ones((10,10)) imshow(a,extent=(0,10,0,10)) imshow(a,extent=(10,20,0,10)) axis((0,20,0,10)) Thanks, Mark - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting images side by side
After further anlysis, I still get the light colored lined at x=10 when I zoom-in interactively on that line (still using TkAgg). Have you tried zooming-in? I tried to zoom in on my eps and png files with the overlap, and they look fine. That's all. I can live with it just fine, but it is odd. Still would like to know what interpolation option you used. Thanks, Mark On 8/21/07, Mark Bakker [EMAIL PROTECTED] wrote: I use TkAgg on win32, and saw the line on screen and in png and eps files. I tried nudging it, but that didn't work either. So I tried the following overlap and still saw the line: a = ones((10,10)) imshow(a,extent=( 0.0,11.0,0.0,10.0)) imshow(a,extent=(10.0,20.0,0.0,10.0)) axis((0,20,0,10)) So I figured it had to do with the interpolation. I used the default interpolation ('bilinear'). When I do the above overlap with interpolation set to 'nearest', I don't get the line! What interpolation were you using? Thanks for your help, Mark On 8/21/07, Eric Firing [EMAIL PROTECTED] wrote: Mark, What backend? I don't see it when I run your lines in ipython -pylab, with gtkagg in use (linux). Have you tried using floating point extents and fudging them very slightly to overlap? Eric Mark Bakker wrote: Hello all - I am trying to plot two images side byside. The problem is that I get a white line between them. Even when the extent of the two images are exactly next to eachother. Does anybody know how to get rid of the white line? Here's an easy example: from pylab import * a = ones((10,10)) imshow(a,extent=(0,10,0,10)) imshow(a,extent=(10,20,0,10)) axis((0,20,0,10)) Thanks, Mark - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now http://get.splunk.com/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] question on the use of annotate
Hello, I never noticed the 'annotate' option in pylab. I have been trying unsuccesfully to get it to work. I am working in interactive mode and get the following error. Thanks for any help, Mark plot([1,2,3]) annotate( 'Mark', (1,2), (1,2.5) ) Traceback (most recent call last): File pyshell#4, line 1, in ? annotate('Mark',(1,2),(1,2.5)) File C:\Python24\lib\site-packages\matplotlib\pylab.py, line 2383, in annotate draw_if_interactive() File C:\Python24\lib\site-packages\matplotlib\backends\backend_tkagg.py, line 59, in draw_if_interactive figManager.show() File C:\Python24\lib\site-packages\matplotlib\backends\backend_tkagg.py, line 305, in show self.canvas.draw() File C:\Python24\lib\site-packages\matplotlib\backends\backend_tkagg.py, line 154, in draw FigureCanvasAgg.draw(self) File C:\Python24\lib\site-packages\matplotlib\backends\backend_agg.py, line 392, in draw self.figure.draw(renderer) File C:\Python24\lib\site-packages\matplotlib\figure.py, line 569, in draw for a in self.axes: a.draw(renderer) File C:\Python24\lib\site-packages\matplotlib\axes.py, line 1155, in draw a.draw(renderer) File C:\Python24\lib\site-packages\matplotlib\text.py, line 1762, in draw self.update_positions(renderer) File C:\Python24\lib\site-packages\matplotlib\text.py, line 1720, in update_positions self._x, self._y = self._get_xy(x, y, self.textcoords) TypeError: unpack non-sequence - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a contour from dicrete data
Viraj and Jeff - Maybe one extension of Jeff's answer. The process works as long as x, y, and z are 2D arrays of the same size and shape. Hence, x and y don't have to form a rectangular grid. I have used this feature regularly for conformal mapping. And it makes a lot of sense. The contour routine simply looks for intersections between x and y values. Then when it plots it uses the x and y values in the arrays. So when those are not a rectangular grid, it doesn't care. It's a cool feature. I can give an example if you want, Mark Viraj Vajratkar wrote: hey guys... i got it... u can use contour(x,y,z)... as in x=load('urfile1.dat'), y=load('urfile2.dat), z=load('urfile3.dat ') and then type out the above for details about the parameters x,y,z see... . http://www.scilab.org/product/man-eng/graphics/contour.htm so matplotlib CAN plot a contour from discrete points!!! ive tried it and it works... Viraj: That only works because x and y describe a rectangular grid. If x and y described irregularly spaced points, you would need to grid the data first using one of the methods described on that Cookbook page. -Jeff - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a contour from dicrete data
I thought it was cool the first time I saw it. Just try something simple from pylab import * x,y = meshgrid(linspace(-5,5,101),linspace(0,5,101)) h = y z = x + complex(0,1)*y znew = z**0.25 # Doing a simple conformal map xnew = znew.real ynew = znew.imag contourf(xnew,ynew,h,linspace(0,5,10)) axis('scaled') And you get nice contours in a pieslice-shaped domain with an angle of 45 degrees Mark From: Scott Sinclair [EMAIL PROTECTED] That is very cool, I hadn't thought of it! So what you're saying is that any transformation (a complex distortion) of a regular rectangular grid is fine. The fact that the grid's 'pixels' are four sided quadrilaterals satisfies this condition and the contour algorithm works... Cheers, Scott Mark Bakker [EMAIL PROTECTED] 7/11/2007 11:36 Viraj and Jeff - Maybe one extension of Jeff's answer. The process works as long as x, y, and z are 2D arrays of the same size and shape. Hence, x and y don't have to form a rectangular grid. I have used this feature regularly for conformal mapping. And it makes a lot of sense. The contour routine simply looks for intersections between x and y values. Then when it plots it uses the x and y values in the arrays. So when those are not a rectangular grid, it doesn't care. It's a cool feature. I can give an example if you want, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Setting linestyle of contours with negative values problem
Hello - I tried to turn of the feature that makes contours with negative values dashed. According to the mailinglist this should go by setting: rcParams[' contour.negative_linestyle']=('None','None') I tried any combination of the None, None syntax, or just 'solid', but nothing worked. Example shown below. I am using 0.90.1. Thanks, Mark from pylab import * x,y = meshgrid(linspace(-3,3,10),linspace(-3,3,10)) rcParams['contour.negative_linestyle']=('None','None') contour(x,y,x,colors='b') Error message: Traceback (most recent call last): File pyshell#10, line 1, in ? contour(x,y,x,colors='b') File C:\Python24\Lib\site-packages\matplotlib\pylab.py, line 1777, in contour draw_if_interactive() File C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py, line 59, in draw_if_interactive figManager.show() File C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py, line 311, in show self.canvas.draw() File C:\Python24\Lib\site-packages\matplotlib\backends\backend_tkagg.py, line 154, in draw FigureCanvasAgg.draw(self) File C:\Python24\Lib\site-packages\matplotlib\backends\backend_agg.py, line 392, in draw self.figure.draw(renderer) File C:\Python24\Lib\site-packages\matplotlib\figure.py, line 601, in draw for a in self.axes: a.draw(renderer) File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 1286, in draw a.draw(renderer) File C:\Python24\Lib\site-packages\matplotlib\collections.py, line 700, in draw transoffset) ValueError: invalid literal for float(): None - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] change in color handling (or bug in 0.90.1) ?
I know for a fact that it used to work for fill( [0,1,1], [0,0,1], '#66'). But maybe I was just lucky. It would be nice if you can make the change officially, Mark On 6/7/07, Eric Firing [EMAIL PROTECTED] wrote: Mark Bakker wrote: Hello - This used to work: fill( [0,1,1], [0,0,1], '#66') But it doesn't work anymore under 0.90.1. I thought it still worked under 0.90.0 I don't think this behavior is documented, and a very quick look at recent changes to axes.py did not reveal a corresponding change, but it looks like it would be easy add and it seems to me like a useful and logical extension. The idea is that if a string is a valid mpl colorspec (including, but not limited to, hex strings as in the example above), then it sets the color; otherwise the present code is used to interpret strings like '-k' etc. If no one is working on this, and if there is no objection, I can implement it later today or tomorrow. Does anyone see any ambiguity or other problem with this? Eric Anybody see the same problem? Plot seems to have the same problem: plot([1,2,3],'#af') Error message for the plot statement: Traceback (most recent call last): File pyshell#11, line 1, in ? plot([1,2,3],'#af') File C:\Python24\Lib\site-packages\matplotlib\pylab.py, line 2028, in plot ret = gca().plot(*args, **kwargs) File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 2535, in plot for line in self._get_lines(*args, **kwargs): File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 421, in _grab_next_args for seg in self._plot_2_args(remaining, **kwargs): File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 313, in _plot_2_args linestyle, marker, color = _process_plot_format(fmt) File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 153, in _process_plot_format raise ValueError, err ValueError: Unrecognized character # in format string Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] change in color handling (or bug in 0.90.1) ?
Hello - This used to work: fill( [0,1,1], [0,0,1], '#66') But it doesn't work anymore under 0.90.1. I thought it still worked under 0.90.0 Anybody see the same problem? Plot seems to have the same problem: plot([1,2,3],'#af') Error message for the plot statement: Traceback (most recent call last): File pyshell#11, line 1, in ? plot([1,2,3],'#af') File C:\Python24\Lib\site-packages\matplotlib\pylab.py, line 2028, in plot ret = gca().plot(*args, **kwargs) File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 2535, in plot for line in self._get_lines(*args, **kwargs): File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 421, in _grab_next_args for seg in self._plot_2_args(remaining, **kwargs): File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 313, in _plot_2_args linestyle, marker, color = _process_plot_format(fmt) File C:\Python24\Lib\site-packages\matplotlib\axes.py, line 153, in _process_plot_format raise ValueError, err ValueError: Unrecognized character # in format string Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Prompt in MPL
I think a prompt could be very useful in MPL, just to build small little GUI's that only need 1 or 2 boxes. I also realize it is not easy, and for bigger jobs you want a full GUI environment like wx or Tk anyway, so I understand it when developers set other priorities. Then again, I would really use it, Mark From: Matthias Michler [EMAIL PROTECTED] Hello everybody, Now my question is: Could a prompt be a useful part of matplotlib? - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Prompt in MPL
I notice the alignment problem. But it looks like you are close. On my machine (win32), the 'enter' key didn't work either. It works like a backspace. That sounds like what Matthias reported. Mark On 6/5/07, John Hunter [EMAIL PROTECTED] wrote: On 6/5/07, John Hunter [EMAIL PROTECTED] wrote: I worked on this some time ago, I never got to the point where I thought it was ready for production but it is close. There is a problem if usetex is enabled, because partial tex strings will cause errors. But you can use it with regular text or plain text. Typo: plain text was meant to be math text Now I remember what really bothered me about this widget, and it wasn't just the usetex problem. The problem is that mpl has three different vertical alignment methods for text: top, bottom and center. None of them are right for a text box: you want baseline. Try typing thinking into the text box and watch what happens when you add and remove the g. We do need to support baseline alignment for text, so if someone has an interest in adding this it would be a very useful feature, not just for a text box for for text alignment (eg tick labels) in general. See the image of the g at http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html for a visual representation -- hwat I am calling the baseline they refer to as the origin in that graph. Our default alignment should be origin or baseline but we don't have support for that. JDH - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Prompt in MPL - NEVER MIND
I just saw in the code: if event.key is None: # simulate backspace So it works properly, Mark On 6/5/07, Mark Bakker [EMAIL PROTECTED] wrote: I notice the alignment problem. But it looks like you are close. On my machine (win32), the 'enter' key didn't work either. It works like a backspace. That sounds like what Matthias reported. Mark On 6/5/07, John Hunter [EMAIL PROTECTED] wrote: On 6/5/07, John Hunter [EMAIL PROTECTED] wrote: I worked on this some time ago, I never got to the point where I thought it was ready for production but it is close. There is a problem if usetex is enabled, because partial tex strings will cause errors. But you can use it with regular text or plain text. Typo: plain text was meant to be math text Now I remember what really bothered me about this widget, and it wasn't just the usetex problem. The problem is that mpl has three different vertical alignment methods for text: top, bottom and center. None of them are right for a text box: you want baseline. Try typing thinking into the text box and watch what happens when you add and remove the g. We do need to support baseline alignment for text, so if someone has an interest in adding this it would be a very useful feature, not just for a text box for for text alignment (eg tick labels) in general. See the image of the g at http://freetype.sourceforge.net/freetype2/docs/glyphs/glyphs-3.html for a visual representation -- hwat I am calling the baseline they refer to as the origin in that graph. Our default alignment should be origin or baseline but we don't have support for that. JDH - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] simple question: how to set the gap between label and axis
Sorry to bother you guys, but I cannot figure out how to set the gap between the axis label and the axis. I know it can be done. Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] All-in-one distribution of python/numpy/scipy/mpl for windows
Thanks for the pointer to the new egg installer of Enthought. Nice app, which I will use. But this is, IMHO, not what we need to move the python/numpy/scipy/mpl combo into the more mainstream use. Many potential users won't know what to do with the long list of packages that they have never heard of. I think it would be very useful to have one installer that gets a reasonable distrubtion installed (like the old Enthought installer). Isn't something like that in the works for the Mac? We can even make a python/numpy/scipy/mpl and then a seperate one that also includes ipython and wxpython, for example. Or maybe a webpage where you can just select what eggs to install. Would that be doable? Anybody else think this is what we need? Mark Date: Fri, 11 May 2007 11:17:47 -0500 From: Robert Kern [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] use of enthought Python for matplotlib/numpy To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=UTF-8 Giorgio Luciano wrote: I would add one box of donuts, since I'm trying to make my own distribution with numpy/scipy/matplotlib but with no success. and the problem is the same is for a classroom ;) If anyone knows also a portable distribution with this package I will add extra donuts ;) While we at Enthought are not updating the all-in-one installer anymore, we are distributing up-to-date binaries as eggs. http://code.enthought.com/enstaller/ -- Robert Kern I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth. -- Umberto Eco -- Message: 8 Date: Fri, 11 May 2007 11:48:59 -0500 From: John Hunter [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] matplolib equivalent of gnuplot's impulse To: Emmanuel [EMAIL PROTECTED] Cc: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed On 5/3/07, Emmanuel [EMAIL PROTECTED] wrote: With gnuplot one can do a plot like that : http://www.deqnotes.net/gnuplot/images/impulses.png It is using option with impulse. Is there an equivalent in matplotlib? In [5]: t = arange(0.0, 2.0, 0.05) In [6]: s = sin(2*pi*t) In [7]: vlines(t, 0, s) Out[7]: matplotlib.collections -- Message: 9 Date: Fri, 11 May 2007 19:05:04 +0200 From: Antonino Ingargiola [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] matplolib equivalent of gnuplot's impulse To: John Hunter [EMAIL PROTECTED] Cc: Emmanuel [EMAIL PROTECTED], matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-1; format=flowed 2007/5/11, John Hunter [EMAIL PROTECTED]: On 5/3/07, Emmanuel [EMAIL PROTECTED] wrote: With gnuplot one can do a plot like that : http://www.deqnotes.net/gnuplot/images/impulses.png It is using option with impulse. Is there an equivalent in matplotlib? In [5]: t = arange(0.0, 2.0, 0.05) In [6]: s = sin(2*pi*t) In [7]: vlines(t, 0, s) Out[7]: matplotlib.collections You are right! Very nice :-). ~ Antonio -- Message: 10 Date: Fri, 11 May 2007 10:54:36 -0700 (PDT) From: [EMAIL PROTECTED] Subject: Re: [Matplotlib-users] SVG vs PNG To: matplotlib-users@lists.sourceforge.net Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ascii Thanks everybody for the explanation of svg in Gimp. That makes sense. Is there any vector based program that does what Gimp does? Did you try eps rather than ps? Eric Yes, I tried eps. Word won't recognize that neither. As to the EMF format, I downloaded the package and attempted to apply the patch. Failed - probably because it's intended for 0.85 only. I am running 0.90 of MPL. Has anybody added EMF support to MPL 0.90successfully? Regards, -- John Henry -- - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users End of Matplotlib-users Digest, Vol 12, Issue 20 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users
[Matplotlib-users] How to start IDLE with -n option????
Hello list - I want to run mpl interactively from IDLE on Windows XP. For that I need to use the '-n' option when starting IDLE. However, in the recent version of Python, when I select the IDLE icon and right click to set the properties, the 'target' is now grey and cannot be edited. In the past I could edit the target and add the '-n' option. Not anymore. Any ideas how to change this? Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] problem with FancyArrow overhang
Hello list - I am trying to use FancyArrow to draw an arrow with given length. The length I use is from 0 to 100. I specify length_includes_head=True. This works fine when I specify a width and length. But when I specify an overhang, the length of the arrow becomes much longer than 100. Am I using overhang incorrectly? Here's a script with the problem: from pylab import * from matplotlib.patches import FancyArrow axis([0,120,0,100]) ax = gca() a = FancyArrow( 0, 40, 100, 0, length_includes_head=True, head_width=5, head_length=5) ax.add_patch(a) b = FancyArrow( 0, 60, 100, 0, length_includes_head=True, head_width=5, head_length=5, overhang=5) ax.add_patch(b) draw_if_interactive() Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] use of enthought Python for matplotlib/numpy
I use Python/numpy/mpl/scipy to teach Computational methods for scientists and engineers. Yeah, a mouthfull, but that's what it is. We mainly solve problems of heat flow, groundwater flow, and diffusion-type equations in the class. Both fun analytic solutions and finite difference solutions. So the inclusion of contouring in mpl a while back was a big break-through for us. And it works very nicely. I have had no problems with the sourceforge mailing list, but I am not very keen on how it handles threads. That could be much better, but it works ok right now, Mark On 5/10/07, Yusdi Santoso [EMAIL PROTECTED] wrote: Steve: Thanks for the link to the Portable SciPy. That opens up a lot of new ideas :) Mark: Thanks for the info. I am not a very regular Enthoughy user so I am not aware of that fact. Just out of curiosity, what kind of class are you teaching? Programming or maths? I will be very interested if you could tell me about how Python/matplotlib/numpy are used in real life class situation..perhaps I could glean some inspiration for WebLab. Btw, has there been any problem with the sourceforge mailing list in the last week or two? Thanks, Yusdi _ Like the way Microsoft Office Outlook works? You'll love Windows Live Hotmail. http://imagine-windowslive.com/hotmail/?locale=en-usocid=TXT_TAGHM_migration_HM_mini_outlook_0507 - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] use of enthought Python for matplotlib/numpy
I noticed on your Web Lab website that you suggest to download the Enthouhht edition. Although I suggest that to my students for class as well, we are currently running into some problems as the latest Enthought edition still includes an old numpy (version less than 1.0). Some important changes were made just before the 1.0 release, so please be aware of that. Now that we are on the topic, does anybody have good enough connections with Enthought to convince them to update the distribution? I can toss-in a box of donuts if that would help, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] confusion about what part of numpy pylab imports
Well, if I can cast a vote, it would make a lot of sense if pylab functions do the same thing as numpy functions. Right now it is exceedingly confusing when I teach, that zeros() could be integers or floats. An rc parameter where we would import straight from numpy would be most excellent. Can't wait! Thanks for the explanations, Mark On 4/24/07, Eric Firing [EMAIL PROTECTED] wrote: Gary Ruben wrote: Hi Mark, this thread may help: http://thread.gmane.org/gmane.comp.python.numeric.general/13399/focus=13421 Essentially, pylab uses a compatibility layer to ease the task of supporting the three array packages - currently this uses the Numeric version of the ones and zeros functions giving the behaviour you observe - this will be fixed when pylab drops support for the older packages, which should be soon. What we will do is drop the use of numerix internally, but the numerix module will almost certainly remain, presumably with the Numeric and numarray support removed; so numerix will still use numpy's own oldnumeric compatibility layer, and I expect pylab will still import from it--at least, by default. The intention is to avoid breaking things unnecessarily. I can imagine possible variations, such as using an rc param to tell pylab whether to import from plain numpy or from oldnumeric, and splitting pylab into core pylab functions (figure, show, etc.) versus the convenience all-in-one namespace (mostly from numpy); but we will take one step at a time. Eric Gary R. Mark Bakker wrote: Hello list - I am confused about the part of numpy that pylab imports. Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it returns integers by default, rather than floats. The same holds for 'ones' and 'empty'. Example: from pylab import * zeros(3) array([0, 0, 0]) from numpy import * zeros(3) array([ 0., 0., 0.]) Can this be fixed? Any explanation how this happens? Pylab just imports part of numpy, doesn't it? Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] confusion about what part of numpy pylab imports
Hello list - I am confused about the part of numpy that pylab imports. Apparently, pylab imports 'zeros', but not the 'zeros' from numpy, as it returns integers by default, rather than floats. The same holds for 'ones' and 'empty'. Example: from pylab import * zeros(3) array([0, 0, 0]) from numpy import * zeros(3) array([ 0., 0., 0.]) Can this be fixed? Any explanation how this happens? Pylab just imports part of numpy, doesn't it? Thanks, Mark - This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] numpy migration
On Wed, 4 Apr 2007, John Hunter apparently wrote: If anyone has any comments or objections to this plan, speak now. I only switched a couple of months ago (basically because I was waiting for numpy 1.0 and for scipy to switch) and numpy is so much nicer! (Not that I didn't like Numeric; I couldn't have started without them!). Starting the numpy jettison for MPL may encourage others to make the move. They have to move eventually anyway. And I think they will be very happy in the end. +1 for me, Mark - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matlab, idle, interactivity and teaching
Dear List - Thanks for the discussion on the issue of the real strength of the Python/matplotlib/numpy/scipy combo. I use Python for both development and teaching, but my biggest question concerned teaching. When I teach, I need something easy and powerful, but also something that is easy to install and 'feels' like other Windows software. Furthermore, I don't want to teach them matlab (too expensive and too restrictive) or any of its clones (cheaper, but still too restrictive). So I settled on Python with matplotlib and am very happy with it. In class, we always use it in interactive mode. I use IDLE because it has a nice Windows feel to it and it comes with an editor, even though I understand that ipython is much more powerful. It is my experience that one of the big hurdles of using the Python/matplotlib/numpy/scipy combo is installation. Many people are just not comfortable installing a whole bunch of packages to get something to work. In that respect the Enthought edition has been super (my only request to them would be to make a new version available more frequent, but I know they do this all for free so I even feel bad asking). Regarding the don't confuse the newbie comment, I disagree. Many people that come with a small programming background or a matlab background don't get confused with the current documentation. I think it is pretty well done. Maybe we need separate docs for inexperienced and experienced programmers? The changes I suggested were to get more inexperienced programmers to join the Python/matplotlib/numpy/scipy world. I was re-reading the documentation on numpy in the bus this morning, in preperation for a workshop I got to give (to mostly matlab guys). And boy, is numpy nice. I have given the workshop several times, but always with Numeric. I got quite some converts to matplotlib (from matlab) just because they like the graphical output much better. Mark - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matlab, idle, interactivity and teaching
Giorgio - Thanks for starting this discussion and sorry for the late reply. Use of Python with matplotlib in the classroom and by students in general is a major objective of mine. I use IDLE with numpy, scipy, and matplotlib. The IDLE problem is really annoying though. Starting with -n is required (a strange hack for many students), and then you cannot restart the interpreter. I keep hoping that the IDLE developers will be able to change the code such that this is not necessary anymore. Another difficulty is that it is cumbersome to change directories. In that respect, it would be great if pylab had a change directory (cd) command. That would make interactive use a lot easier. This could also be an IDLE feature of course. Another question I get from matlab users is why there isn't a 'whos' to figure out all the variables that are used. This is really an interactive issue, where the IDLE would be used as an interpreter (calculator really), not as a means to develop serious code. So to summarize, I think getting matlab users switched over, I see the following three issues high on the list: 1. Get rid of the -n problem for running matplotlib interactively. 2. Make an easy cd command. 3. Make an who option. On the bright side, I get quite a few people converted that don't want to go back anymore Mark Message: 7 Date: Wed, 28 Mar 2007 16:58:42 +0200 From: Giorgio Luciano [EMAIL PROTECTED] Subject: [Matplotlib-users] matlab, idle, interactivity and teaching To: Discussion of Numerical Python numpy-discussion@scipy.org, matplot matplotlib-users@lists.sourceforge.net, SciPy Users List [EMAIL PROTECTED] Message-ID: [EMAIL PROTECTED] Content-Type: text/plain; charset=ISO-8859-15; format=flowed Hello to all, I've thread that apperead some time ago on this list about matlab and teaching. I've discovered python recently and translated part of the routine I use in python (www.chemometrics.it). Some of my collegue asked me if I could show them how to use python. For matlab user I guess the first problem is to setup everything, but I just fixed it preparing a directory with all the package I need and a matplotlibrc file for interactive mode + a shortcut for idle -n use. The second problem is that people now wants some bells and whistles of matlab that I have to admit sometime can be very helpful for saving time. The bells and whistles are about the workspace. It's difficult to cut and paste from gnumeric/excel (I generally use txt file but it's no so immediate) and also there is no visual workspace. I cannot succeed also in saving workspace (I know there is a function so iosave.mat but I didn't manage easily hot to use it) For overpass this problems I've tried to use QME-DEV which is in early stage of development (alpha) but promise well. What people like of python/matplot/scipy -its free ;) -they like a lot the plotting style and capabilities (they find the png and svg file very clear and accurate) -they like IDLE as editor (ehy it's has the same color of matlab ;) ! ) So my question is . Do you have a similar experience ? How do you help people in moving the first step ? do you use (and also does it exist) a more friendly environment than IDLE except from QME-DEV. I know that this question may look silly, but in my opinion also how much is user friendly a software is very important for getting new users. Cheers to all Giorgio - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] matlab, idle, interactivity and teaching
I always thought ipython didn't come with a good editor. Am I mistaken? Mark On 3/30/07, Lou Pecora [EMAIL PROTECTED] wrote: Have you looked at iPython? I think it's a great way to go. Check it out. --- Mark Bakker [EMAIL PROTECTED] wrote: Giorgio - Thanks for starting this discussion and sorry for the late reply. Use of Python with matplotlib in the classroom and by students in general is a major objective of mine. I use IDLE with numpy, scipy, and matplotlib. The IDLE problem is really annoying though. [cut] -- Lou Pecora, my views are my own. --- I knew I was going to take the wrong train, so I left early. --Yogi Berra Be a PS3 game guru. Get your game face on with the latest PS3 news and previews at Yahoo! Games. http://videogames.yahoo.com/platform?platform=120121 - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] what is the old default font?
Hello List - A while back, the default font changed in the matplotlibrc file. Does anybody recall what the old default font was? I kinda liked it better than the current font, but I don't recall what it was. Thanks, Mark - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] troubles with plot_date
Hello - I am trying to plot two sets of data on one graph, using plot_date. But I get an error. It is easy to replicate, by calling the plot_date function twice. Is this supposed to work? from pylab import * plot_date(linspace(726468,726668,4),linspace(0,1,4)) plot_date(linspace(726468,726668,4),linspace(0,1,4)) And I get the error: Traceback (most recent call last): File pyshell#2, line 1, in ? plot_date(linspace(726468,726668,4),linspace(0,1,4)) File C:\Python24\Lib\site-packages\matplotlib\pylab.py, line 2064, in plot_date ret = gca().plot_date(*args, **kwargs) File C:\Python24\lib\site-packages\matplotlib\axes.py, line 2395, in plot_date self.xaxis_date(tz) File C:\Python24\lib\site-packages\matplotlib\axes.py, line 1564, in xaxis_date formatter = AutoDateFormatter(locator) UnboundLocalError: local variable 'locator' referenced before assignment Any ideas? Thanks, Mark - Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users