Re: [Matplotlib-users] Draping an image over topography in Basemap
I had just been looking into this myself. My starting point would be this example: http://stackoverflow.com/questions/13570287/image-overlay-in-3d-plot-using-python but instead of the hard-coded '10' as the z values in plot_surface, put in whatever data or function of x and y that you want. Using x+y seemed to do what I expected. Is that what you're looking for? On Wed, Jun 11, 2014 at 2:40 PM, Hearne, Mike mhea...@usgs.gov wrote: Is it possible to drape an image over a topography dataset? One example, from a package called GMT, is here: http://gmt.soest.hawaii.edu/doc/5.1.1/gallery/ex32.html If so, does anyone have a sample of how this would be accomplished? Thanks, Mike -- HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing Easy Data Exploration http://p.sf.net/sfu/hpccsystems ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- HPCC Systems Open Source Big Data Platform from LexisNexis Risk Solutions Find What Matters Most in Your Big Data with HPCC Systems Open Source. Fast. Scalable. Simple. Ideal for Dirty Data. Leverages Graph Analysis for Fast Processing Easy Data Exploration http://p.sf.net/sfu/hpccsystems___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] twiny and AxisDivider
I'm trying to do a twiny setup on one of the Axes generated from a make_axes_locatable().append_axes() call. The new axis generated from twiny() seems to span the entire window though. Here's the code: from matplotlib.pyplot import * import numpy as np from mpl_toolkits.axes_grid1 import make_axes_locatable ax_c = subplot(111) ax_c.plot(np.linspace(0,10)) divider = make_axes_locatable(ax_c) ax_t = divider.append_axes(top, size=1.2, pad=0.1, sharex=ax_c) ax_r = divider.append_axes(right, size=1.2, pad=0.1, sharey=ax_c) ax_r.plot(np.linspace(0,50)) ax_t.plot(np.linspace(0,25)) ax_ty = ax_r.twiny() ax_ty.plot(np.linspace(-50,0)) show() If you get the idea of what I'm trying to do, other suggestions involving AxesGrid, subplots, or otherwise are welcome. AxesGrid seems to require that I have all four plots in a 2x2 grid (in the above code there are only 3), and using subplots would seemingly require the rightmost plot to span the height of the other two. There's this: http://matplotlib.org/examples/pylab_examples/scatter_hist.html but I don't want to hard-code the dimensions, as the center subplot should change dimensions as I put in new data... -- Flow-based real-time traffic analytics software. Cisco certified tool. Monitor traffic, SLAs, QoS, Medianet, WAAS etc. with NetFlow Analyzer Customize your own dashboards, set traffic alerts and generate reports. Network behavioral analysis security monitoring. All-in-one tool. http://pubads.g.doubleclick.net/gampad/clk?id=126839071iu=/4140/ostg.clktrk___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Hovemuller Diagram
Finally I got installed by following link below That's not a PPA for Ubuntu... -- 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
Re: [Matplotlib-users] Hovemuller Diagram
Am 12.07.2013 09:51, schrieb Phil Elson: for instance last week we added a PPA so that with the necessary repos added you would be able to apt-get install python-iris on an Ubuntu machine Could you please point me to this PPA? Where can I find the link? -- 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
Re: [Matplotlib-users] timeseries forecast error?
I would just use the fill_between method http://matplotlib.org/examples/pylab_examples/fill_between_demo.html?highlight=codex%20fill_between http://matplotlib.org/examples/pylab_examples/fill_between_demo..html?highlight=codex%20fill_between today I found this: http://tonysyu.github.io/mpltools/auto_examples/special/plot_errorfill.html#example-special-plot-errorfill-py ideally exactly what I need. -- Introducing AppDynamics Lite, a free troubleshooting tool for Java/.NET Get 100% visibility into your production application - at no cost. Code-level diagnostics for performance bottlenecks with 2% overhead Download for free and get started troubleshooting in minutes. http://p.sf.net/sfu/appdyn_d2d_ap1 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Linecollection, labels
Due to that my first question a couple of day back was a mess i thougth i could clear things up. Is there any way to label the lines using linecollection. In plot there is label, example; plot(x,y,label = Hello) But are there any way to do the same thing with linecollection? If not, is there any eother asy way of creating labels on a line? Best regards, Tim -- Forrester Wave Report - Recovery time is now measured in hours and minutes not days. Key insights are discussed in the 2010 Forrester Wave Report as part of an in-depth evaluation of disaster recovery service providers. Forrester found the best-in-class provider in terms of services and vision. Read this report now! http://p.sf.net/sfu/ibm-webcastpromo___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Lable lines
Hello! I have written a temprature logger using mathplotlib, i take in a list of multiple lines and print them out with Linecollection, i also supply a list of colors. Now to the the question, what is the best way (function) to explain to the user what line in the graph that correspond to each temprature node. What im looking for is some sort of function that make a list in the facion; Green - Node1 -- Xperia(TM) PLAY It's a major breakthrough. An authentic gaming smartphone on the nation's most reliable network. And it wants your games. http://p.sf.net/sfu/verizon-sfdev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Alpha not working from imshow?
I'm generating images that I want to use as overlays in Google Earth. Thus, I would like the masked portion of the numpy arrays I am using to appear as transparent. However, I seem to consistently get white instead of a transparent point. To clarify the issue, I wrote this short piece of code. I am setting both the figure background to transaprent and the masked value to transparent but I get white. I have pulled the current svn code and built matplotlib. I get the same issue. from numpy import ma import matplotlib.pyplot as plt from pylab import colorbar, imshow, show, cm def main(): a = ma.array([[1,2,3],[4,5,6]],mask=[[0,0,1],[0,0,0]]) fig = plt.figure() fig.patch.set_alpha(0.0) cmap = cm.jet cmap.set_bad(alpha=0.0) imshow(a, interpolation='nearest', cmap=cmap) colorbar() show() Any thoughts? Tim B -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Alpha not working from imshow?
Thanks, Paul! A bit of tweaking in my actual app but it now works beautifully! On 18/01/2011, at 4:08 PM, Paul Ivanov wrote: Tim Burgess, on 2011-01-18 13:32, wrote: I'm generating images that I want to use as overlays in Google Earth. Thus, I would like the masked portion of the numpy arrays I am using to appear as transparent. However, I seem to consistently get white instead of a transparent point. To clarify the issue, I wrote this short piece of code. I am setting both the figure background to transaprent and the masked value to transparent but I get white. I have pulled the current svn code and built matplotlib. I get the same issue. from numpy import ma import matplotlib.pyplot as plt from pylab import colorbar, imshow, show, cm def main(): a = ma.array([[1,2,3],[4,5,6]],mask=[[0,0,1],[0,0,0]]) fig = plt.figure() fig.patch.set_alpha(0.0) cmap = cm.jet cmap.set_bad(alpha=0.0) imshow(a, interpolation='nearest', cmap=cmap) colorbar() show() Hi Tim, sorry to hear of your troubles - add these two lines to get your desired effect: ax = plt.gca() ax.patch.set_alpha(0.0) The figure has a patch associated with it, but so does each axes subplot, which is what you were seeing through the transparent portion of your masked array image. best, -- Paul Ivanov 314 address only used for lists, off-list direct email at: http://pirsquared.org | GPG/PGP key id: 0x0F3E28F7 -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Protect Your Site and Customers from Malware Attacks Learn about various malware tactics and how to avoid them. Understand malware threats, the impact they can have on your business, and how you can protect your company and customers by using code signing. http://p.sf.net/sfu/oracle-sfdevnl ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] image conversion
On Dec 16, 2010 at 09:24 PM -0800, Robert Field wrote: That's what I thought at first too, but imagemagick/graphicsmagick aren't able to do the work. I've found something else to use in the meantime. Thanks, You could save an additional pdf version with your matplotlib code and convert that with imagemagick. -- Lotusphere 2011 Register now for Lotusphere 2011 and learn how to connect the dots, take your collaborative environment to the next level, and enter the era of Social Business. http://p.sf.net/sfu/lotusphere-d2d ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Formatter dates
Thanks for the reply! Do you know what makes X climb? And can you control its on some way? // Tim From: jdh2...@gmail.com Date: Wed, 17 Nov 2010 05:55:04 -0600 Subject: Re: [Matplotlib-users] Formatter dates To: qw...@hotmail.com CC: matplotlib-users@lists.sourceforge.net On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg qw...@hotmail.com wrote: Hello! I have now been tampering with a custom formatter and the more i think about it the more i feel there must be a more easy soulution. I have a set of values that are plotted over time (i use date2num, to get the conversion from date to num), i also have a list with dates that corresponds to these values; ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 10:27:55.913000'], this to not have to do a conversion back, i imagine its the most effective way to do it. Now to the question; The only two values in the datelist that is vital is the first and the last, in between i really just want to have values that corresponds lineary. Thats brings me to resoulution, if the values are far far in between, say weeks or even moth the time (h:s:ms) isnt so important and vice versa. Is there any formatter that do this sort of things? eg. takes in two values(dates) and format it by itself. Take a look at this example http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html It's trying to solve a different but related problem: in financial time series you only have data on Monday - Friday, and you don't want to plot the gaps on weekends. So you plot the data linearly with an index, and use a custom locator and formatter to set and format the ticks. JDH -- Increase Visibility of Your 3D Game App Earn a Chance To Win $500! Tap into the largest installed PC base get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Formatter dates
Thanks for the reply! I have been looking into it now and thinks i have get the hang of how it works rougly. Do you know any way to know the max-value of X straight away? I have a list of dates that with listlength Y, the X spans from 0 - something. So if i could figure out what something is i could get the ratio and then plot the dates by indexing the ratio times X eg. (Xmax / listlength) * X. // Tim From: jdh2...@gmail.com Date: Wed, 17 Nov 2010 05:55:04 -0600 Subject: Re: [Matplotlib-users] Formatter dates To: qw...@hotmail.com CC: matplotlib-users@lists.sourceforge.net On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg qw...@hotmail.com wrote: Hello! I have now been tampering with a custom formatter and the more i think about it the more i feel there must be a more easy soulution. I have a set of values that are plotted over time (i use date2num, to get the conversion from date to num), i also have a list with dates that corresponds to these values; ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 10:27:55.913000'], this to not have to do a conversion back, i imagine its the most effective way to do it. Now to the question; The only two values in the datelist that is vital is the first and the last, in between i really just want to have values that corresponds lineary. Thats brings me to resoulution, if the values are far far in between, say weeks or even moth the time (h:s:ms) isnt so important and vice versa. Is there any formatter that do this sort of things? eg. takes in two values(dates) and format it by itself. Take a look at this example http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html It's trying to solve a different but related problem: in financial time series you only have data on Monday - Friday, and you don't want to plot the gaps on weekends. So you plot the data linearly with an index, and use a custom locator and formatter to set and format the ticks. JDH -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Formatter dates
Solved it, was thinking backwards again. From: qw...@hotmail.com To: matplotlib-users@lists.sourceforge.net Date: Mon, 22 Nov 2010 09:00:38 + Subject: Re: [Matplotlib-users] Formatter dates Thanks for the reply! I have been looking into it now and thinks i have get the hang of how it works rougly. Do you know any way to know the max-value of X straight away? I have a list of dates that with listlength Y, the X spans from 0 - something. So if i could figure out what something is i could get the ratio and then plot the dates by indexing the ratio times X eg. (Xmax / listlength) * X. // Tim From: jdh2...@gmail.com Date: Wed, 17 Nov 2010 05:55:04 -0600 Subject: Re: [Matplotlib-users] Formatter dates To: qw...@hotmail.com CC: matplotlib-users@lists.sourceforge.net On Wed, Nov 17, 2010 at 2:29 AM, Tim Åberg qw...@hotmail.com wrote: Hello! I have now been tampering with a custom formatter and the more i think about it the more i feel there must be a more easy soulution. I have a set of values that are plotted over time (i use date2num, to get the conversion from date to num), i also have a list with dates that corresponds to these values; ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 10:27:55.913000'], this to not have to do a conversion back, i imagine its the most effective way to do it. Now to the question; The only two values in the datelist that is vital is the first and the last, in between i really just want to have values that corresponds lineary. Thats brings me to resoulution, if the values are far far in between, say weeks or even moth the time (h:s:ms) isnt so important and vice versa. Is there any formatter that do this sort of things? eg. takes in two values(dates) and format it by itself. Take a look at this example http://matplotlib.sourceforge.net/examples/api/date_index_formatter.html It's trying to solve a different but related problem: in financial time series you only have data on Monday - Friday, and you don't want to plot the gaps on weekends. So you plot the data linearly with an index, and use a custom locator and formatter to set and format the ticks. JDH -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Formatter dates
Hello! I have now been tampering with a custom formatter and the more i think about it the more i feel there must be a more easy soulution. I have a set of values that are plotted over time (i use date2num, to get the conversion from date to num), i also have a list with dates that corresponds to these values; ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 10:27:55.913000'], this to not have to do a conversion back, i imagine its the most effective way to do it. Now to the question; The only two values in the datelist that is vital is the first and the last, in between i really just want to have values that corresponds lineary. Thats brings me to resoulution, if the values are far far in between, say weeks or even moth the time (h:s:ms) isnt so important and vice versa. Is there any formatter that do this sort of things? eg. takes in two values(dates) and format it by itself. // Tim -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Formatter dates
I just checked it up, and it had some nice function, the timeseries looked nice and maybe i can use it in some way (time_series looked interesting) . I dont want to go away from Linecollection way of plotting due to its speed or is the timeseries-way a fast way of plotting? Date: Wed, 17 Nov 2010 09:55:13 +0100 Subject: Re: [Matplotlib-users] Formatter dates From: pgmdevl...@gmail.com To: qw...@hotmail.com Tim, have you tried the scikits.timeseries package? Its plotting capacities, albeit limited, may be helpful in your case... On Nov 17, 2010 9:31 AM, Tim Åberg qw...@hotmail.com wrote: Hello! I have now been tampering with a custom formatter and the more i think about it the more i feel there must be a more easy soulution. I have a set of values that are plotted over time (i use date2num, to get the conversion from date to num), i also have a list with dates that corresponds to these values; ['2010-11-05 10:27:45.605000', '2010-11-05 10:27:50.576000', '2010-11-05 10:27:55.913000'], this to not have to do a conversion back, i imagine its the most effective way to do it. Now to the question; The only two values in the datelist that is vital is the first and the last, in between i really just want to have values that corresponds lineary. Thats brings me to resoulution, if the values are far far in between, say weeks or even moth the time (h:s:ms) isnt so important and vice versa. Is there any formatter that do this sort of things? eg. takes in two values(dates) and format it by itself. // Tim -- Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Linecollection, Dates on X-axis
Thats seems to be what im after, diffrent resolution but that would be a easy fix i guess :) Did you manage to run the example? i got a; datafile = cbook.get_sample_data('msft.csv', asfileobj=False) AttributeError: 'module' object has no attribute 'get_sample_data' error Subject: RE: [Matplotlib-users] Linecollection, Dates on X-axis Date: Thu, 11 Nov 2010 13:44:43 + From: david.bri...@ubs.com To: qw...@hotmail.com If I've got you correctly I asked a similar question this morning on StackOverflow. They pointed me to - http://matplotlib.sourceforge.net/examples/pylab_examples/date_index_for matter.html. -Original Message- From: Tim-- [mailto:qw...@hotmail.com] Sent: Thu 11-Nov-2010 08:54 To: matplotlib-users@lists.sourceforge.net Subject: [Matplotlib-users] Linecollection, Dates on X-axis Hello! I have written a program that plots values over Time, because it has to be done(plotted) fast the date_plot didnt fit the bill so i moved over to Linecollection and it works like a charm. The only problem i have now is that i dont know any easy way to get dates on the x-axis. Any ideas? -- View this message in context: http://old.nabble.com/Linecollection%2C-Dates-on-X-axis-tp30188192p30188 192.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users Visit our website at http://www.ubs.com This message contains confidential information and is intended only for the individual named. If you are not the named addressee you should not disseminate, distribute or copy this e-mail. Please notify the sender immediately by e-mail if you have received this e-mail by mistake and delete this e-mail from your system. E-mails are not encrypted and cannot be guaranteed to be secure or error-free as information could be intercepted, corrupted, lost, destroyed, arrive late or incomplete, or contain viruses. The sender therefore does not accept liability for any errors or omissions in the contents of this message which arise as a result of e-mail transmission. If verification is required please request a hard-copy version. This message is provided for informational purposes and should not be construed as a solicitation or offer to buy or sell any securities or related financial instruments. UBS Limited is a company limited by shares incorporated in the United Kingdom registered in England and Wales with number 2035362. Registered office: 1 Finsbury Avenue, London EC2M 2PP. UBS Limited is authorised and regulated by the Financial Services Authority. UBS AG is a public company incorporated with limited liability in Switzerland domiciled in the Canton of Basel-City and the Canton of Zurich respectively registered at the Commercial Registry offices in those Cantons with Identification No: CH-270.3.004.646-4 and having respective head offices at Aeschenvorstadt 1, 4051 Basel and Bahnhofstrasse 45, 8001 Zurich, Switzerland. Registered in the United Kingdom as a foreign company with No: FC021146 and having a UK Establishment registered at Companies House, Cardiff, with No: BR 004507. The principal office of UK Establishment: 1 Finsbury Avenue, London EC2M 2PP. In the United Kingdom, UBS AG is authorised and regulated by the Financial Services Authority. UBS reserves the right to retain all messages. Messages are protected and accessed only in legally justified cases. -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Linecollection, Dates on X-axis
Hello! I have written a program that plots values over Time, because it has to be done(plotted) fast the date_plot didnt fit the bill so i moved over to Linecollection and it works like a charm. The only problem i have now is that i dont know any easy way to get dates on the x-axis. Any ideas? -- View this message in context: http://old.nabble.com/Linecollection%2C-Dates-on-X-axis-tp30188192p30188192.html Sent from the matplotlib - users mailing list archive at Nabble.com. -- Centralized Desktop Delivery: Dell and VMware Reference Architecture Simplifying enterprise desktop deployment and management using Dell EqualLogic storage and VMware View: A highly scalable, end-to-end client virtualization framework. Read more! http://p.sf.net/sfu/dell-eql-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Hz to KHz
On Jul 26, 2010 at 02:01 PM -0300, Waléria Antunes David wrote: i don't understand.. Just divide through by '1000.' or '1000.0' (same thing). If you write 3100/1000, you'll get '3' because you are doing integer math. If you write 3100/1000.0, you'll get '3.1' because you are doing float math. -- The Palm PDK Hot Apps Program offers developers who use the Plug-In Development Kit to bring their C/C++ apps to Palm for a share of $1 Million in cash or HP Products. Visit us here for more details: http://ad.doubleclick.net/clk;226879339;13503038;l? http://clk.atdmt.com/CRS/go/247765532/direct/01/ ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Mac OS X 10.6 dmg install
On Jun 24, 2010 at 04:52 PM -0400, Tim Gray wrote: I'm updating my python install but am running into problems with matplotlib, as always. This time around I'd thought I'd use the .dmg installer. I've already installed Python 2.6.5 from python.org and numpy from scipy.org. Both of these work. I noticed the matplotlib installer wants to install to /Library/Python/2.6/site-packages, even though the appropriate location for the python.org install is in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages. As a result, when I run python 2.6.5 from python.org, it doesn't matplotlib. To clarify, I've taken screen shots of the 0.99.3 and 0.99.1.1 dmg installers. If you look in the bottom pane of the window, you will see the install location which you cannot change. The 0.99.1.1 installer places files in the appropriate location for python.org 2.6.5. The 0.99.3 installer places files in the appropriate location for the OS X bundled version of python (2.6.1) that we have been warned not to use. http://www.dropbox.com/gallery/100367/1/matplotlib?h=49e1ff -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Mac OS X 10.6 dmg install (Tim Gray)
On Jun 24, 2010 at 09:37 PM -0700, Hana Sevcikova wrote: I think you just need to direct the PYTHONPATH variable to the place where matplotlib is installed. My PYTHONPATH looks like this: /Library/Frameworks/Python.framework/Versions/Current/lib/python2.6/site-packages:/Library/Python/2.6/site-packages I think that underscores the problem. The matplotlib OS X dmg installer installs matplotlib in the site-packages directory for the system default install of Python (2.6.1). Everywhere I read insists that on OS X you should install python.org's python, which puts it's site-packages in the location you say. The numpy installer puts stuff in the right place. But matplotlib is not there. -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Mac OS X 10.6 dmg install
On Jun 25, 2010 at 10:01 AM -0700, Christopher Barker wrote: Anyway, it's been common practice to build binaries for the python.org python -- it's the way to reach the widest audience. MPL used to do this. I suspect the latest binary is a mistake, but if not, it should be Clearly labeled as for the ApplePython2.6-osx-10.6, and ideally, a python.org compatible binary provided as well. I'm sorry I can't find the time to do that myself right now. I'll be ok for the time being. I've been using matplotlib, scipy, and numpy (and variants) for the past 5 years or so on OS X. Every time I go to upgrade, the recommended procedure changes. The previous version still runs however, so I'll survive. It would be useful though to make a note for whoever packages official releases of matplotlib for OS X to make sure they are targeting the python.org install of python. numpy and scipy also do this. It makes it a lot easier to push python as a Matlab/IDL replacement if potential users can just download four dmgs (python, numpy, scipy, and matplotlib) and it all just works out of the box. Thanks for the help! Tim -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Mac OS X 10.6 dmg install
I'm updating my python install but am running into problems with matplotlib, as always. This time around I'd thought I'd use the .dmg installer. I've already installed Python 2.6.5 from python.org and numpy from scipy.org. Both of these work. I noticed the matplotlib installer wants to install to /Library/Python/2.6/site-packages, even though the appropriate location for the python.org install is in /Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/site-packages. As a result, when I run python 2.6.5 from python.org, it doesn't matplotlib. Two questions: Is there a good reason for this? And what's the workaround. Thanks. Tim -- ThinkGeek and WIRED's GeekDad team up for the Ultimate GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the lucky parental unit. See the prize list and enter to win: http://p.sf.net/sfu/thinkgeek-promo ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Placing a marker at specific places where lines join?
Hello, I have a similar problem to: Suppose I plot a line from (0,0) to (1,1.5) to (2,2). Now I want to mark (1,1.5) with a green circle. How is that done? I am performing a curve fit and also showing a distribution in my plot. In order to help the reader to evaluate the result I would like to draw certain boundaries (vertical and horizontal line). While I am aware on how to draw such lines, I would like to know wheather there are some functions in matplotlib which help me to retrieve the coordinates a) at which two curves intersect b) at which a distribution reaches a certain value? Example: How do I get the y-axis value which is reached by the green curve in http://matplotlib.sourceforge.net/_images/histogram_demo_extended_021.png a x-axis value of in 175? I could proably use a solver from numpy like http://docs.scipy.org/doc/numpy/reference/generated/numpy.linalg.solve.html#numpy.linalg.solve but if I plot a distribution, the equation of the envelove is unknown at the first place. I'd appreciate your help or pointers to examples. Thanks a lot in advance, Timmie -- SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Building basemap on OS X 10.6
On 10/11/2009, at 3:37 AM, Christopher Barker wrote: Tim Burgess wrote: Sodecided to go down the MacPorts path. Many automated downloads later, I now have a successful Basemap install (yay!) Many thanks to the folks who have contributed to MacPorts and interestingly geos 3.1.1 is installed. Is it 64 bit now. If so... Only present worry is that wxWidgets port is not building on 10.6 - yet to resolve that. wxWidgets/wxPython can not be built (for the Mac) 64 bit. It is built on Carbon, which Apple has not and will not port to 64 bit. There is a Cocoa version of wxMac, but it's not done yet, and has not been wrapped for Python. You may be able to get a 64bit GTK/X11 wxPython working with MacPorts -- I've never tried that. And FYI, to check whether you have a 64bit Python install: import sys; print sys.maxint 9223372036854775807 So it looks like you are running 64 bit -- what a pain this all is. -Chris Yes, I'm running all 64bit now. Can't say I'm seeing dramatic performance improvements as I haven't done much in basemap in 32bit to compare. I did find a couple of problems with the current MacPort basemap. I could create a Basemap object with a resolution of 'c' but specifying a resolution of 'i' caused a program failure. And the example 'warpimage.py' failed to run as well. The error wasn't obvious to my eye so I simply did an svn checkout and built the code into an .egg and then did an /opt/local/bin/ easy_install-2.6 basemap-0.99.5-py2.6-macosx-10.6-i386.egg I can now use the higher resolution option and warpimage.py all runs fine. As for wxWidgets, there is some pain there. Pierre GM (thanks!) made the suggestion of simply using the MacOSX matplotlib backend and so problem neatly side-stepped (for me at least). ~~ Tim Burgess Software Engineer - Coral Reef Watch Satellite Applications and Research - NESDIS National Oceanic and Atmospheric Administration http://www.coralreefwatch.noaa.gov 675 Ross River Rd, Kirwan QLD Australia 4817 tim.burg...@noaa.gov Ph +61-7-47551811 Fax +61-7-47551822 -- Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day trial. Simplify your report design, integration and deployment - and focus on what you do best, core application coding. Discover what's new with Crystal Reports now. http://p.sf.net/sfu/bobj-july ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Multicolor line with dates
Hi all, I'm relatively new to matplotlib but have been generating some plots without too much trouble over the last couple of weeks. Now I'm getting trickier... I have a timeseries plot that plots a few values against an x-axis of dates. I *really* want to have my key line change color to red when the values are *critical* but am having no success working with the examples I can find. It appears that with dates as an x-axis, something else needs to happen. Here is the code: # prep for multicolored line -- here I simply generate the list of required color values r = colorConverter.to_rgba('r') b = colorConverter.to_rgba('black') color = list() for f in daily_fvfm: if f = -0.4: color.append(r) else: color.append(b) # create the linecollection points = zip(date_range, daily_fvfm) segments = zip(points[:-1], points[1:]) lc = LineCollection(segments, colors = color) --- here is where I get the error at run-time (see below) # create a figure with two subplots and add a # second axis to the first figure fig = mpl.figure(1) fig.set_size_inches((10,5)) ax1 = fig.add_subplot(211) ax2 = ax1.twinx() ax3 = fig.add_subplot(212) # plot the sst and then the par ax1.plot(date_range[start_index:end_index], daily_sst[start_index:end_index], 'b-') ax1.plot(date_range[start_index:end_index], daily_par[start_index:end_index], color='darkgoldenrod') # then plot Fv/Fm #ax2.plot(date_range[start_index:end_index], daily_fvfm[start_index:end_index], lw='2', color='black') ax2.add_collection(lc) Traceback (most recent call last): File plot.py, line 87, in module lc = LineCollection(segments, colors = color) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/collections.py, line 926, in __init__ self.set_segments(segments) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/matplotlib/collections.py, line 938, in set_segments seg = np.asarray(seg, np.float_) File /Library/Frameworks/Python.framework/Versions/2.6/lib/ python2.6/site-packages/numpy/core/numeric.py, line 230, in asarray return array(a, dtype, copy=False, order=order) ValueError: setting an array element with a sequence. Can a multicolor line be done with dates. if so, what is the manipulation I need to do for dates? Tim Burgess -- Come build with us! The BlackBerry(R) 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 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] How to plot straight lines on polar plots
Hello, I am trying to create a plot that resembles the layout of the chart seen below: http://www.nabble.com/file/p21721073/brisbane.png are you actually trying to plot sun path digrams? May you share a part of your code once it is completed? I'd be very interested in seeing a working example. Kind regards, Timme -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Zip Archive for the gallery plot
Hello, are the nice examples from gallery on the matplotlib homepage somewhere available as a ZIP-archive? I would like to have them as reference during time I am not connected to the net. Thanks and regards, Timmie -- This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] A wxPython/Matplotlib/Basemap example
Hello Mauro, I am not just trying, Sorry for disregarding your using the term trying. I am indeed implementing a software package for species distribution mapping and biogeographic analysis, using wxPython/Matplotlib. Thanks for being more specific. There is another program aiming at /similar/ goals: http://www.metamodellers.com/epigrass.html But this is not my domain of work... And, by the way, it is going quite well. My crongrats! Both Thuban and QGis, as generalized implementations of GIS, are far from adequate for my needs (and of fellow conservation biologists). I just thought of there because they easyly convert CSV into geographical data. In case you are after format conversion you may see: ogr2ogr. Hope this helps. Vice versa. I thought that my ideas my be useful. Nevertheless, have all possible sucess! Kind regards, Timmie - 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] A wxPython/Matplotlib/Basemap example
Hello! I am attaching the current version of source code plus a screenshot. I would like to ask you why you are trying to implement this by yourself in wxPython/matplotlib. There are already two pythonised applications that may be used for your purpose. And they are aware of the projections and different geographical formats: * QGIS with Pythons libary and plugins: http://qgis.org/content/view/145/113/ * Thuban: http://thuban.intevation.org/ Maybe this could save you some work/time. Kind regards, Timmie - 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] Plot a Dictionary, time and value
Hello, excuse the late reply. But you may be interested in the timeseries scikit: http://scipy.org/scipy/scikits/wiki/TimeSeries http://www.scipy.org/Cookbook/TimeSeries/FAQ Have success! Kind regards, Timmie - 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] plotting a contour map from CSV file
Hello Jeff, I just wanna give feedback on what got me going here: data preparation ### data is loaded from a CSV file ### lats = y # data[:,0] ## lon = x lons = x # data[:,1] ## values = z values = z #data[:,2] ### lat_uniq = list(set(lats.tolist())) nlats = len(lat_uniq) lon_uniq = list(set(lons.tolist())) nlons = len(lon_uniq) color_map = plt.cm.spectral print lats.shape, nlats, nlons yre = lats.reshape(nlats,nlons) xre = lons.reshape(nlats,nlons) zre = values.reshape(nlats,nlons) later in the defined map CT = m.contourf(xre, yre, zre, cmap=color_map) Of course, this can be simplified. But, really, in the end the solution was just simple and I hadn't thought of it... If you want I can try to create a short example for the distribution. Thanks for your help again, Timmie - 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] Basemap to KML polygon
Looks like I've done a mistake with my last post, sorry Eli... I know how to save datas to a shapefile with the OGR library but only for points datas. I'll appreciate if somebody can point me how to save a filled contour map basemap into a polygon shapefile, can't find any example with google. What do you really want to save here? A basemap with a contour surface overlayed can be viewed as a assembly of various layers. So this is like the result of the gis operations when you launch the map composer to finish your map. If you want to create a raster file from the contour part plotted over a basemap I think the python bindings of gdal will get you started. http://pypi.python.org/pypi/GDAL/ I succeded into writing a tiff file from a gdal array. I don't know how to write a vector file from python with ogr or shapely. But these questions are better to be asked on the gdal list.: So about interpolating to a contour look at shapely. Writing should be accomplished with ogr. That said, I only have testing experience with writing geodata with python. The overkill may be to invoke the respective GRASS command by a script. I would appreciate if you would tell us what you use by the end. Kind regards, Timmie When it comes to python and GIS the first stop seems to be: * http://gispython.org/ * http://lists.gispython.org/mailman/listinfo/community Some more links: * http://de.giswiki.net/wiki/Kategorie:Python * http://de.giswiki.net/wiki/WorldMill * http://zcologia.com/news/750/keytree/ * http://sgillies.net/ - 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] ocean profile
I'd love to see it included to -- I believe the problem is finding a good code that is BSD compatible. Yes. Some examples on plotting data using spatial interpolation would be very nice. One with the delauny package: see below at: http://scipy.org/scipy/scikits/ And one with griddata: http://code.google.com/p/griddata-python/ We could use the accepted data sets from http://www.itc.nl/personal/rossiter/teach/lecnotes.html#l6 I have tested the griddata package but didn't reach very far due to other task to be accomplished earlier. Kind regards, Timmie - 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] ploting a contour graph from data files
Oz Nahum schrieb: Hi, I want to draw a contour plot which uses data from files. I know how to import the files, so it's not the main issue. I was discussion a similar issue with Jeff this week. Take a look at the thread: http://news.gmane.org/gmane.comp.python.matplotlib.general Unfortunately, I had to focus on other things and had to postpone the development of my script... - 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 a contour map from CSV file
Dear Matplotlib-Users, I am tryring to create a contour plot over a basemap. My main problem is creating the array for the Z values as a basis for the plt.contour command from a CSV file where latitude, longitude and value are stored column-wise: lat;lon;value 50; 10; 6 ... The data represents a regular spaced grid with a datapoint each 0.25 degrees. I tried various possibilities but didn't have success: 1) following simpletest.py from the basemap examples: X, Y = meshgrid(data[:,1], data[:,0]) Z = data[:,2] m.contourf(x,y, Z) = Error: Z must be a 2D array - How do I get Z to be a 2D array? 2) using the griddata package Here I was nearly without orientation how to call griddata correctly. 3) Using the python bindings of ogr Any examples on this one? From my above demonstrated methods the following questions arrise: What is the preferred way to plot - Points stored in the above descripbed format (lat, lon, value)? - Interpolate a grid of data points by using different interpolation methods like inverse distance wheighting, natural neighbor interpolation, etc. to get a contour map? Thanks in advance for your help kind regards, Timmie - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a contour map from CSV file
Hello Jeff, - Points stored in the above descripbed format (lat, lon, value)? This one I solved using a m.scatter() function - Interpolate a grid of data points by using different interpolation methods like inverse distance wheighting, natural neighbor interpolation, etc. to get a contour map? For interpolation of irregular, randomly distributed data points see http://www.scipy.org/Cookbook/Matplotlib/ Gridding_irregularly_spaced_data. However, if there is some structure to the data grid then it's probably better not to use these approaches. The problem is that although regular spaced the grid is still to large to countour to a nice map. I will play a bit more with contour and other interpolation functions. I tried griddata: 2) using the griddata package Here I was nearly without orientation how to call griddata correctly. I tried again. Here is what I got: x = data[:,1] y = data[:,0] z = data[:,2] X, Y = mlab.meshgrid(x, y) X, Z = mlab.meshgrid(x, y) # zi = griddata(x,y,z,xi,yi,**kwargs) Z = grid.griddata(x,y,z, X, Y) plt.contour(X,Y, Z) = ValueError: output grid defined by xi,yi must be monotone increasing The coordinates are stored in a way that first longitude (x) increases and then the latitude (y) increases. 10 6.0 4 10 6.25 3 10 6.50 2 10 6.75 1 10 6.0 6 11 6.25 7 11 6.50 6 11 6.75 9 12 6.0 4 What how do I need to arrange my data to get it monotone increasing for griddata? Thanks for your help. One settled I will send you another example for the examples package. Kind regards, Timmie - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] plotting a contour map from CSV file
Hello, thanks. I checked again from contour_demo.py of the basemap distribution. There lats, lons are uniquely monoton increasing from 0-360 and from -90 to 90. In my case data is written row-by-row: * increasing from lowest latitude western most longitude to easternmost longitude and then increasing each rows in the same manner to the northermost latitude (see below). So, as you said, it's a question of re-aranging the data. that it fits the to the way m.contour expects the 2-D array. Also, since the grid is still coarse, I would need to apply some smoothing afterwards. What do you recommend for that? I don't know how I can do this easily by hand. May you give me some guidance here, please? But I may just convert it to a shape file using GIS then load it with the shapefile interface you wrote. What would you see as most convenient way? If I produce maps with a GIS but want to use matplotlib for the map plotting, what would be the preferred export format? Any gdal format? Many thanks in advance, Timmie ### data example LatitudeLongitude value 45 7 7.65251434 45 7.256.841345477 45 7.5 3.923153289 45 7.753.644313708 45 8 3.550977951 45 8.253.352525137 45 8.5 3.080082094 45 8.752.971992657 45 9 2.998723785 45 9.253.080082094 45 9.5 3.185687405 45 9.753.102075854 45 10 3.185687405 45 10.25 3.213960325 45 10.53.32326373 45 10.75 3.465643983 45 11 3.612980369 45 11.25 3.644313708 45 11.53.701277511 45 11.75 3.923153289 45 12 3.797848342 45 12.25 3.612980369 45 12.53.435577844 45 12.75 3.294210812 45 13 3.26536503 45.25 7 6.485050223 45.25 7.256.343081631 45.25 7.5 3.856783573 45.25 7.753.405725407 45.25 8 3.550977951 45.25 8.253.294210812 45.25 8.5 3.294210812 45.25 8.753.185687405 45.25 9 3.15761656 45.25 9.253.213960325 45.25 9.5 3.15761656 45.25 9.753.32326373 45.25 10 3.405725407 45.25 10.25 3.495925216 45.25 10.53.465643983 45.25 10.75 3.550977951 45.25 11 3.465643983 45.25 11.25 3.765429652 45.25 11.53.95669157 45.25 11.75 3.797848342 45.25 12 3.923153289 45.25 12.25 3.733239867 45.25 12.53.550977951 45.25 12.75 3.520306012 45.25 13 3.376085288 45.57 6.383367092 45.57.256.383367092 45.57.5 6.009422688 45.57.754.679469855 45.58 3.435577844 45.58.253.435577844 45.58.5 3.236725042 45.58.753.236725042 45.59 3.185687405 45.59.253.102075854 45.59.5 3.102075854 45.59.753.185687405 45.510 3.352525137 45.510.25 3.405725407 45.510.53.376085288 45.510.75 3.612980369 45.511 3.520306012 45.511.25 3.352525137 45.511.53.823949103 45.511.75 3.856783573 45.512 3.856783573 45.512.25 3.765429652 45.512.53.669541114 45.512.75 3.550977951 45.513 3.435577844 45.75 7 5.309043916 45.75 7.256.057519881 45.75 7.5 5.030958443 45.75 7.754.836570243 45.75 8 4.836570243 45.75 8.252.724965001 45.75 8.5 2.607751091 45.75 8.753.26536503 45.75 9 2.898163214 45.75 9.252.872155245 45.75 9.5 1.893252754 45.75 9.752.043669061 45.75 10 1.7543 45.75 10.25 2.004264146 45.75 10.52.971992657 45.75 10.75 1.804949998 45.75 11 2.846334614 45.75 11.25 5.519419657 45.75 11.52.517818813 45.75 11.75 3.733239867 45.75 12 3.376085288 45.75 12.25 3.550977951 45.75 12.53.612980369 45.75 12.75 3.520306012 45.75 13 3.495925216 46 7 5.06399168 46 7.254.949174095 46 7.5 5.266087828 46 7.755.352298328 46 8 4.757472437 46 8.252.800325674 46 8.5 3.612980369 46 8.753.185687405 46 9 2.323282473 46 9.251.671485743 46 9.5 3.856783573 46 9.754.572079662 46 10 4.679469855 46 10.25 4.679469855 46 10.55.309043916 46 10.75 3.294210812 46 11 3.405725407 46 11.25 3.669541114 46 11.53.495925216 46 11.75 4.255093726 46 12 3.495925216 46 12.25 3.185687405 46 12.53.213960325 46 12.75 3.550977951 46 13 3.520306012 46.25 7 1.969297411 46.25 7.254.908706364 46.25 7.5 3.052767233 46.25 7.753.765429652 46.25 8 3.95669157 46.25 8.255.06399168 46.25 8.5 5.266087828 46.25 8.753.669541114 46.25 9 3.185687405 46.25 9.253.797848342 46.25 9.5 3.352525137 46.25 9.755.439709782 46.25 10 5.69098301 46.25 10.25 4.949174095 46.25 10.55.736883145 46.25
Re: [Matplotlib-users] plotting a contour map from CSV file
Hello Jeff, Timme: Here's one way to do it many thanks so far. I still have to inspect and improve my script. But at least your code lead me to some contourd surface. I will come back and tell if it worked. Unfortunately I cannot disclose the data nor the results because of copyright issues. So this mail is just to thank you for your responsiveness to my questions. Timmie - Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW! Studies have shown that voting for your favorite open source project, along with a healthy diet, reduces your potential for chronic lameness and boredom. Vote Now at http://www.sourceforge.net/community/cca08 ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] axes scale factor not showing
Hi, When matplotlib uses an axis multiplier, as in x-axis in the script below, the scale factor is not positioned properly on the figure as is shown in the attached picture. The 'x1e+30' in the bottom right corner is clipped unless I enlarge the window. import Numeric, gtk import matplotlib matplotlib.use('GTK') import matplotlib.figure, matplotlib.axes, matplotlib.backends.backend_gtk # data values = Numeric.array([-1e30, -1e30, 0,1,2,3,4,5,6,7,8,9], 'd') # figure figsize=(6,3) figure = matplotlib.figure.Figure(figsize=figsize) canvas = matplotlib.backends.backend_gtk.FigureCanvasGTK(figure) axes = matplotlib.axes.Subplot(figure, 111) figure.add_axes(axes) axes.hist(values, bins=10) axes.set_title('X-scale multiplier is hidden', fontsize=10) # window to display window = gtk.Window() window.connect('destroy', gtk.main_quit) window.add(canvas) window.show_all() gtk.main() I can use the axes position to work I guess but that seems rather unsatisfactory as I'll have to figure out when it's being displayed or not, font sizing and spacing blah blah blah. Is there an easier way around this (or a fix?)? I'm using v0.90.0 Thanks Tim -- Tim Mitchell Software Engineer Applied Research Associates (NZ) Ltd. (www.aranz.com) Ph: +64 (3) 374-6120 ext: 203 Fax: +64 (3) 374-6130 Skype: tim-mitchell inline: noscale.png- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] axes scale factor not showing
Hi, When matplotlib uses an axis multiplier, as in x-axis in the script below, the scale factor is not positioned properly on the figure as is shown in the attached picture. The 'x1e+30' in the bottom right corner is clipped unless I enlarge the window. import Numeric, gtk import matplotlib matplotlib.use('GTK') import matplotlib.figure, matplotlib.axes, matplotlib.backends.backend_gtk # data values = Numeric.array([-1e30, -1e30, 0,1,2,3,4,5,6,7,8,9], 'd') # figure figsize=(6,3) figure = matplotlib.figure.Figure(figsize=figsize) canvas = matplotlib.backends.backend_gtk.FigureCanvasGTK(figure) axes = matplotlib.axes.Subplot(figure, 111) figure.add_axes(axes) axes.hist(values, bins=10) axes.set_title('X-scale multiplier is hidden', fontsize=10) # window to display window = gtk.Window() window.connect('destroy', gtk.main_quit) window.add(canvas) window.show_all() gtk.main() I can use the axes position to work I guess but that seems rather unsatisfactory as I'll have to figure out when it's being displayed or not, font sizing and spacing blah blah blah. Is there an easier way around this (or a fix?)? I'm using v0.90.0 Thanks Tim inline: noscale.png- This SF.net email is sponsored by the 2008 JavaOne(SM) Conference Don't miss this year's exciting event. There's still time to save $100. Use priority code J8TL2D2. http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Newbie / plot([1,2,3]) issues / Csound
Hi Folks, I've been using Python about 9 months or so, inspired mainly by the desire to work more effectively with Csound. Python has been a revelation to my creativity music making ambitions, probably the most satisfying consuming creative diversion i have ever made. Ive today installed Numpy Matplotlib (on XP), set TKagg as my backend in the matplotlibrc file. When i try run the plot([1,2,3]) example (im working from the matplotlib user guide pdf document, which generally looks very nice, much like matplotlib itself dare i say..) a TK window opens, but nothing appears in it, the hourglass continues ad infinitum, the process eventually hangs. This also happened when i ran IDLE from the command line (something i'd never done before) with the -n flag... Idle's window tells me that an output plot object was sucessfully created however... So, err, what could the problem be? I'm using standard windows binary installers for everything, Python 2.5, Numpy 1.0.3.1, Matplotlib 0.91.2. Everything imports ok. On a less immediate note, i would like to address people to this post i made earlier today on the Tkinter list http://www.nabble.com/drawing-multiple-functions-on-the-canvas-td16064458.html for some advice /or assistance. Whilst i can see Matplotlib as being useful to my DSP musicmaking world in a number of adhoc ways, i'm primarily interested in trying to find shortcuts methods to defining arbitrary functions with the mouse(/wacom) input, recording the x/y(/z) data into an array, refreshing / displaying that data to the screen. There seems to be plenty around to help me scribble on a canvas, but not in a way that allows me to keep unique, function like, myfunc[x] = y lists display them to screen. I've been aware for awhile now that Matplotlib may offer me some elegant more than adequate solutions to displaying mathematically defined functions, but can it help me design by hand output overlays of arbitrary xy patterns relationships at all? All i would need to do is then output my input created XY arrays / lists to .txt file, bring the data into my existing Python / Csound environment for immediate easy use. So if anyone has any advice on the simplest, lowlevel way i might go about attempting this (with or without Matplotlib) that'd be ace. But essentially i am talking about displaying refreshing plots after all, right? so hopefully this is a good place to start. Spoilt for choice, swamped by info, uncertain how best to proceed. many thanks Tim - *** www.phasetransitions.net hermetic music * python * csound * possibly mindless ranting various werk in perpetual delusions of progress -- View this message in context: http://www.nabble.com/Newbie---plot%28-1%2C2%2C3-%29-issues---Csound-tp16065553p16065553.html Sent from the matplotlib - users mailing list archive at Nabble.com. - 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] Newbie / plot([1,2,3]) issues / Csound
Thanks Darren, Here's a copy of what IDLE is printing to the screen (i'm using idle because I'm lazy don't like typing filepaths in full ; ) - a lot of my python stuff is about avoiding doing exactly this for csound repeatedly... ) There's nothing specific re the Tk window crash that i can see Many other .py matplotlib examples I have tried work - just (so far) not the plot([1,2,3]) command, nor Anim.py that i have taken from the distributed examples zip. In the case of Anim.py, the window launches displays the animation sucessfully - however any attempt at window interaction results in hang crash. My hunch is the problem is Tk(?), not Matplotlib. I have to admit, the font choice seems like an unusual / unexpected one (see below) Anyway, thanks for taking a look, please advice if anything you see below is illuminating on any issue at all. from pylab import * loaded rc file C:\Python25\lib\site-packages\matplotlib\mpl-data\matplotlibrc matplotlib version 0.91.2 verbose.level debug interactive is True units is False platform is win32 loaded modules: ['pylab', '_bisect', 'xml.sax.urlparse', 'distutils', 'tkFileDialog', 'random', 'datetime', 'idlelib.macosxSupport', 'matplotlib.tempfile', 'distutils.sysconfig', 'encodings.encodings', 'pytz.cStringIO', 'xml', 'struct', 'tempfile', 'xml.sax.urllib', 'pytz.tzinfo', 'idlelib.cPickle', 'matplotlib.__future__', 'imp', 'collections', 'idlelib.MultiCall', 'pytz.os', 'zipimport', 'string', 'SocketServer', 'repr', 'idlelib.string', 'idlelib.bdb', 'pytz.datetime', 'itertools', 'distutils.re', 'idlelib.SocketServer', 'ConfigParser', 'bisect', 'signal', 'idlelib.IOBinding', 'xml.sax.types', 'threading', 'tkMessageBox', 'idlelib.warnings', 'xml.sax.xmlreader', 'matplotlib.pytz', 'idlelib.struct', 'idlelib.cStringIO', 'idlelib.linecache', 'locale', 'idlelib.threading', 'idlelib.TreeWidget', 'idlelib.rpc', 'idlelib.re', 'encodings', 'idlelib.RemoteDebugger', 'idlelib.tempfile', 'shutil', 'dateutil', 'idlelib.codecs', '_tkinter', 'bdb', 'matplotlib.warnings', 'matplotlib.string', 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 'idlelib.RemoteObjectBrowser', 'ntpath', 'idlelib.imp', 'idlelib.locale', 'idlelib.thread', 'math', 'idlelib.Debugger', 'Tkinter', 'idlelib.traceback', 'idlelib.marshal', 'UserDict', 'distutils.os', 'matplotlib', 'Queue', 'idlelib.StackViewer', 'codecs', 'idlelib.copy_reg', 'md5', '_locale', 'idlelib.AutoComplete', 'matplotlib.sre_constants', 'socket', 'thread', 'idlelib.time', 'traceback', 'weakref', 'idlelib.socket', 'idlelib.CallTipWindow', 'os', 'marshal', 'pytz.tzfile', '__future__', 'nturl2path', 'idlelib.AutoCompleteWindow', 'idlelib.tkFileDialog', 'cStringIO', '_sre', 'xml.sax.sys', '__builtin__', 'matplotlib.copy', 'matplotlib.re', 'operator', 'distutils.string', 'select', 'idlelib.os', 'idlelib.ZoomHeight', 'matplotlib.datetime', 'idlelib.ConfigParser', 'errno', '_socket', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys', 'xml.sax.handler', 'idlelib.__builtin__', 'idlelib.tkMessageBox', 'xml.sax.os', 'cPickle', 'matplotlib.xml', 'idlelib.HyperParser', 'encodings.cp1252', 'pytz', 'matplotlib.pyparsing', 'idlelib.repr', 'copy', 'idlelib.Queue', '_struct', '_types', 'matplotlib.dateutil', 'hashlib', 'keyword', 'idlelib.keyword', 'xml.sax.saxutils', 'idlelib.__main__', 'idlelib.sys', 'encodings.aliases', 'matplotlib.fontconfig_pattern', 'exceptions', 'sre_parse', 'pytz.bisect', 'distutils.distutils', 'FixTk', 'copy_reg', 'sre_compile', 'xml.sax', '_hashlib', '_random', 'pytz.struct', 'site', 'SimpleDialog', '__main__', 'idlelib.types', 'matplotlib.weakref', 'urlparse', 'tkCommonDialog', 'matplotlib.os', 'strop', 'encodings.codecs', 'gettext', '_codecs', 'matplotlib.rcsetup', 'nt', 'pytz.sets', 'xml.sax._exceptions', 'idlelib.PyParse', 'xml.sax.codecs', 'stat', '_ssl', 'warnings', 'encodings.types', 'sets', 'sys', 'idlelib.Tkinter', 'idlelib.CallTips', 'idlelib.configHandler', 'idlelib.WindowList', 'idlelib.SimpleDialog', 'os.path', 'idlelib.ScrolledList', 'pytz.gettext', 'distutils.sys', 'matplotlib.distutils', '_weakref', 'idlelib.ObjectBrowser', 'idlelib', 'Tkconstants', 'distutils.errors', 'matplotlib.matplotlib', 'linecache', 'matplotlib.shutil', 'time', 'idlelib.select', 'idlelib.run'] numerix numpy 1.0.3.1 $HOME=C:\Documents and Settings\Tim CONFIGDIR=C:\Documents and Settings\Tim\.matplotlib Using fontManager instance from C:\Documents and Settings\Tim\.matplotlib\fontManager.cache matplotlib data path C:\Python25\lib\site-packages\matplotlib\mpl-data backend TkAgg version 8.4 plot([1,2,3]) findfont found Bitstream Vera Sans, normal, normal 400, normal, 12.0 findfont returning c:\program files\celemony\melodyne.3.0\vstplugins\uhe_data\podolski\fonts\vera.ttf [matplotlib.lines.Line2D instance at 0x018383A0] cue blank TK window with infinite hourglass - *** www.phasetransitions.net hermetic music * python * csound * possibly mindless ranting various werk in perpetual
Re: [Matplotlib-users] import error with Basemap
Timmie: It's possible that the windows installer is missing the httplib2 module - I don't have access to windows right now to check. Could you try installing httplib2 and let me know if that fixes it? Installing httplib2 solved the issue. Has this dependancy on httplib2 been introduced in the last update? What are the merits of this dependency? Could it be made option? Like that I would only need to have httplib2 if I use functions that load maps from the web? Kind regards and thanks for your efforts in developing basemap! Timmie - 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] import error with Basemap
Hello, using the basemap toolkit on Windows with Python 2.5 I get the following import error: In [1]: from matplotlib.toolkits.basemap import Basemap --- type 'exceptions.ImportError' Traceback (most recent call last) M:\ipython console in module() C:\python\Lib\site-packages\matplotlib\toolkits\basemap\__init__.py in module() 1 from basemap import __doc__, __version__ 2 from basemap import * C:\python\Lib\site-packages\matplotlib\toolkits\basemap\basemap.py in module() 36 from numpy import linspace, squeeze, ma 37 from shapelib import ShapeFile --- 38 import _geos, pupynere, netcdftime 39 40 # basemap data files now installed in lib/matplotlib/toolkits/basemap/data C:\python\Lib\site-packages\matplotlib\toolkits\basemap\pupynere.py in module() 35 import numpy 36 --- 37 from dap.client import open as open_remote 38 from dap.dtypes import ArrayType, GridType, typemap 39 C:\python\Lib\site-packages\dap\client.py in module() 2 3 import dap.lib 4 from dap.util.http import openurl 5 from dap.exceptions import ClientError 6 C:\python\Lib\site-packages\dap\util\http.py in module() 2 3 import httplib2 4 5 import dap.lib 6 from dap.exceptions import ClientError type 'exceptions.ImportError': No module named httplib2 In [2]: Why does Basemap need any httplib? I am not needing any remote connection. Any help greatly appreciated. Thanks and kind regards, Timmie - 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] matplotlib, ipython and ubuntu
Hello! Hmm, I did reinstall and still no joy, it insists on install python2.4 at the same time! do a $: sudo apt-get --purge remove matplotlib ipython to really remove the configuration files. then $: sudo apt-get install matplotlib ipython check if pylab is on your system: $: locate pylab Here are the contents of pylab: from matplotlib.pylab import * so you may just test this in a python shell: $ python Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) [GCC 4.1.3 20070929 (prerelease) (Ubuntu 4.1.2-16ubuntu2)] on linux2 Type help, copyright, credits or license for more information. from matplotlib.pylab import * then do the same from within ipython as I'd shown in my previous mail. I hope that this helps you to narrow it down. I have also some troubles with ipython that is currently in Gutsy: ipython Python 2.5.1 (r251:54863, Oct 5 2007, 13:36:32) Type copyright, credits or license for more information. IPython 0.8.1 -- An enhanced Interactive Python. ? - Introduction to IPython's features. %magic - Information about IPython's 'magic' % functions. help- Python's own help system. object? - Details about 'object'. ?object also works, ?? prints more. In [1]: import timeseries as TS In [2]: whos --- type 'exceptions.AttributeError'Traceback (most recent call last) /var/tmp/install/qgislite_trunk/ipython console in module() /var/lib/python-support/python2.5/IPython/iplib.py in ipmagic(self, arg_s) 962 else: 963 magic_args = self.var_expand(magic_args,1) -- 964 return fn(magic_args) 965 966 def ipalias(self,arg_s): /var/lib/python-support/python2.5/IPython/Magic.py in magic_whos(self, parameter_s) 989 array_type = None 990 else: -- 991 array_type = Numeric.ArrayType.__name__ 992 993 # Find all variable names and types so we can figure out column sizes type 'exceptions.AttributeError': 'module' object has no attribute 'ArrayType' maybe some of the IPython power users can give me a hint why this happes. [1] I have already filed a bug report to Ubuntu but are not able to explain more: magic function whos not working in ipython https://bugs.launchpad.net/ubuntu/+source/ipython/+bug/177253 Kind regards, Timmie [1] Thats Why I crosspost to ipython-user. Inital post was: http://permalink.gmane.org/gmane.comp.python.matplotlib.general/11463 - 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] Missing labels/text(s) in plots generated via cgi script.
I deleted my /.matplotlib/fontManager.cache file and ran the script again, and now everything is working fine. Thank you for your help. It appears to be finding wadalab-gothic as the font, which is a Japanese font. Now, *why* it is doing that is the million dollar question. It should (by default) by loading the Bitstream Vera Sans font (Vera.ttf) from /usr/local/lib/python2.4/site-packages/matplotlib/mpl-data/fonts/ttf. I would verify that it is there and readable by the user that the CGI script runs under. You can try refreshing the font-finding cache by removing the file ~/.matplotlib/fontManager.cache. If that doesn't provide any clues, can you send me the fontManager.cache (probably best off-list), and I'll see what fonts it *is* finding, again hopefully providing more clues. One other thing to note about the output: it is loading the matplotlibrc from /home/www/www/cgi-bin/, (since it is present), and not from /home/private/mpl/.matplotlib/. Perhaps there is something incorrect in that matplotlibrc file. Cheers, Mike Tim Lewis wrote: Can you set verbose.level to debug-annoying in your matplotlibrc and send us the output? That may help provide an explanation as to why the text is not appearing. Also, for good measure, can you provide your matplotlibrc file, and information about the platform and versions of Python that you are using? See the attachments. Their platform is RedHat Linux and python 2.4.3 Do you get different results when you run at the commandline vs. from an http request? It could be that incorrect permissions (as user apache, for instance) are causing the problems. Cheers, Mike I'd like to run it from the command line, but I haven't done it before (and not sure how to do it); the web hosting server is in a land far far away. :-) I am just running the script from a http request. I can probably have them run it if need to. Thanks, Tim Lewis wrote: I'm using the code from http://www.scipy.org/Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script to generate plots from my web server. The plot shows up fine (w/o text) but when I use xlabel(x-axis), ylabel(y-axis), or title(A Chart); no text shows up on the plot. Everything seems fine with the install and I don't get any errors when I run the script. It seems that that matplotlib is unable to find the font's and just simply ignores them -- I really dunno. Any suggestions? - 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://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users - 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://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] Missing labels/text(s) in plots generated via cgi script.
Can you set verbose.level to debug-annoying in your matplotlibrc and send us the output? That may help provide an explanation as to why the text is not appearing. Also, for good measure, can you provide your matplotlibrc file, and information about the platform and versions of Python that you are using? See the attachments. Their platform is RedHat Linux and python 2.4.3 Do you get different results when you run at the commandline vs. from an http request? It could be that incorrect permissions (as user apache, for instance) are causing the problems. Cheers, Mike I'd like to run it from the command line, but I haven't done it before (and not sure how to do it); the web hosting server is in a land far far away. :-) I am just running the script from a http request. I can probably have them run it if need to. Thanks, Tim Lewis wrote: I'm using the code from http://www.scipy.org/Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script to generate plots from my web server. The plot shows up fine (w/o text) but when I use xlabel(x-axis), ylabel(y-axis), or title(A Chart); no text shows up on the plot. Everything seems fine with the install and I don't get any errors when I run the script. It seems that that matplotlib is unable to find the font's and just simply ignores them -- I really dunno. Any suggestions? - 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://sourceforge.net/services/buy/index.php ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users matplotlib data path /usr/local/lib/python2.4/site-packages/matplotlib/mpl-data loaded rc file /home/www/www/cgi-bin/matplotlibrc matplotlib version 0.91.1 verbose.level debug-annoying interactive is False units is True platform is linux2 loaded modules: ['_bisect', 'xml.sax.urlparse', 'distutils', 'matplotlib.matplotlib', 'datetime', 'matplotlib.tempfile', 'distutils.sysconfig', 'pytz.datetime', 'pytz.cStringIO', 'xml', 'struct', 'tempfile', 'xml.sax.urllib', 'imp', 'pytz.os', 'zipimport', 'string', 'matplotlib.__future__', 'pytz.tzinfo', 'distutils.re', 'bisect', 'signal', 'random', 'token', 'xml.sax.xmlreader', 'matplotlib.pytz', 'dis', 'pytz.tzfile', 'cgi', 'locale', 'xml.sax.saxutils', 'encodings', 'dateutil', 'matplotlib.warnings', 'warnings', 'matplotlib.string', 'pytz.pytz', 'urllib', 'matplotlib.sys', 're', 'math', 'fcntl', 'UserDict', 'inspect', 'distutils.os', 'matplotlib', 'codecs', 'md5', '_locale', 'matplotlib.sre_constants', 'matplotlib.os', 'thread', 'sre', 'weakref', 'itertools', 'opcode', 'distutils.sys', 'os', '__future__', 'matplotlib.copy', 'cStringIO', '_sre', '__builtin__', 'matplotlib.re', 'distutils.string', 'matplotlib.datetime', 'posixpath', 'errno', '_socket', 'binascii', 'sre_constants', 'matplotlib.md5', 'types', 'pytz.sys', 'tokenize', 'xml.sax.handler', 'xml.sax.os', 'matplotlib.xml', '_codecs', 'pytz', 'matplotlib.pyparsing', 'copy', 'socket', 'matplotlib.dateutil', 'StringIO', 'posix', 'encodings.aliases', 'matplotlib.distutils', 'exceptions', 'sre_parse', 'pytz.bisect', 'mimetools', 'xml.sax.types', 'copy_reg', 'sre_compile', 'xml.sax', '_random', 'pytz.struct', 'site', '__main__', 'shutil', 'matplotlib.weakref', 'strop', 'encodings.codecs', 'gettext', 'matplotlib.rcsetup', 'encodings.exceptions', 'pytz.sets', 'xml.sax._exceptions', 'xml.sax.codecs', 'stat', '_ssl', 'rfc822', 'encodings.types', 'encodings.ascii', 'sets', 'sys', 'xml.sax.sys', 'os.path', 'pytz.gettext', 'matplotlib.fontconfig_pattern', '_weakref', 'distutils.errors', 'urlparse', 'linecache', 'matplotlib.shutil', 'time'] numerix numpy 1.0.4 $HOME=/home/private/mpl CONFIGDIR=/home/private/mpl/.matplotlib Using fontManager instance from /home/private/mpl/.matplotlib/fontManager.cache backend Agg version v2.2 backend_agg.new_figure_manager FigureCanvasAgg.draw RendererAgg.__init__ RendererAgg.__init__ width=800.0, height=600.0 RendererAgg.__init__ _RendererAgg done RendererAgg.__init__ done RendererAgg._get_agg_font findfont failed Bitstream Vera Sans findfont failed DejaVu Sans findfont failed Lucida Grande findfont failed Verdana findfont failed Geneva findfont failed Lucid findfont failed Arial findfont failed Helvetica findfont failed Avant Garde findfont failed Bitstream Vera Sans findfont failed DejaVu Sans findfont failed Lucida Grande findfont failed Verdana findfont failed Geneva
[Matplotlib-users] Missing labels/text(s) in plots generated via cgi script.
I'm using the code from http://www.scipy.org/Cookbook/Matplotlib/Using_MatPlotLib_in_a_CGI_script to generate plots from my web server. The plot shows up fine (w/o text) but when I use xlabel(x-axis), ylabel(y-axis), or title(A Chart); no text shows up on the plot. Everything seems fine with the install and I don't get any errors when I run the script. It seems that that matplotlib is unable to find the font's and just simply ignores them -- I really dunno. Any suggestions? - 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://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] new free matplotlib based software useful for you?
Hello, My company, Resonon, is releasing our free (as in beer) software package, Spectronon. Spectronon is written in python and utilizes matplotlib, numpy, PIL, and scipy. Spectronon's main purpose is analyzing hyperspectral data (images with many more bands of color than the traditional 3: red, green, blue). It can also be useful for more traditional image processing. Perhaps of most interest here, it is a quick way to get access to a command line with a bunch of useful libraries, plotting, and image viewing. It's packaged as a basic exe installer. There is also a fairly simple plug-in architecture for extending some of Spectronon's behavior. As the main developer, I am very thankful for all the good work that gets put in to all these underlying libraries, and I hope that in getting this software out for free, it can in turn support more academic and research applications of python and its libraries. The release will also help me expose bugs, hopefully get more people interested in writing plug-ins for Spectronon, and help me learn other ways to improve the code base. While the source code is not presently open, the API is open in order to support writing plug-ins. Here are some screenshots: http://www.spectronon.com/wiki/index.php?title=Screenshots I recommend users on this list go directly to the developer docs here: http://www.spectronon.com/wiki/index.php?title=Setup_a_Simple_Development_Environment as this tutorial will step you through the aspects of Spectronon of most probable interest. Links to the download, support forums, and more docs are available at http://www.spectronon.com Thanks very much. I hope it's a fun ap for folks, and I greatly appreciate any questions, feedback, or comments as we begin to get this project off the ground. Tim - 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] problems building/installing
oops, my bad. thanks for the correction. t Robert Kern wrote: Tim Hirzel wrote: Its a little tough right now that os x doesn't have one python install to rule them all. Yes it does. http://www.python.org/download/ - 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] problems building/installing
My understanding is that currently the best way to get all these packages (wxpython, matplotlib, numpy, etc) running together on os x is via these packages: http://pythonmac.org/packages/ at least, I can say for sure that the 2.5 builds worked without a hitch for me. Its a little tough right now that os x doesn't have one python install to rule them all. Instead, there are about 5 (not an actual count) ways to do it, most with gotchas. tim Simson Garfinkel wrote: Alas, tried the easy_install matplotlib. It downloaded and installed matplotlib, but didn't install wx, so I got this error: from pylab import *; Traceback (most recent call last): File stdin, line 1, in module File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ pylab.py, line 1, in module from matplotlib.pylab import * File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/pylab.py, line 222, in module new_figure_manager, draw_if_interactive, show = pylab_setup() File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/backends/__init__.py, line 24, in pylab_setup globals(),locals(),[backend_name]) File /Library/Frameworks/Python.framework/Versions/2.5/lib/ python2.5/site-packages/matplotlib-0.90.0-py2.5-macosx-10.4-fat.egg/ matplotlib/backends/backend_wxagg.py, line 19, in module import wx ImportError: No module named wx When I tried to use easy_install to install wxPython, I got this: Computer:/Users/simsong root# easy_install wxPython Searching for wxPython Reading http://cheeseshop.python.org/pypi/wxPython/ Reading http://wxPython.org/ Reading http://wxPython.org/download.php Reading http://cheeseshop.python.org/pypi/wxPython/2.6.3.2 Best match: wxPython src-2.8.3.0 Downloading http://prdownloads.sourceforge.net/wxpython/wxPython- src-2.8.3.0.tar.bz2 Processing wxPython-src-2.8.3.0.tar.bz2 error: Couldn't find a setup script in /tmp/easy_install-UB-WlK/ wxPython-src-2.8.3.0.tar.bz2 Computer:/Users/simsong root# Why do we make this so hard? The wyPython page for Mac says: Mac OS X wxPython needs a special Mac OS X-specific build of Python, called a Framework build, in order to work. Panther and Tiger include a Framework build of Python 2.3, but on Jaguar you'll need to get the MacPython installer from Jack's MacPython page. (I really can't keep track of all these cat names. ) Then I need to choose one of 8 different versions to install, dependin gon whether I am using py2.3, 2.4 or 2.5, and whether I want unicode or ansi, and whether I want PPC or Universal. But I finally got it installed. Thanks. On Apr 4, 2007, at 7:38 AM, Edin Salkovic wrote: On 4/4/07, Simson Garfinkel [EMAIL PROTECTED] wrote: 2. How do I install an EGG file? For detailed instructions about eggs see: http://peak.telecommunity.com/DevCenter/EasyInstall Quick instructions: Download: http://peak.telecommunity.com/dist/ez_setup.py and run it. then run easy_install matplotlib or easy_install /path/to/matplotlib-xxx.egg HTH, Edin - 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 - 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've had similar problems running wxPython code under certain IDEs where things can go very poorly (dramatic crashing, or it just wont execute). At least with the wx or wxagg backends, I have no trouble running matplotlib demos such as ellipse_demo.py from inside eclipse+pydev. -tim Gary Ruben wrote: I have to agree with Giorgio in general. Unfortunately, the threading support required by matplotlib isn't implemented in pyScripter, which means that it's a nice environment until you want to do some plotting, when it becomes a bit flaky. I haven't checked eclipse's behaviour with matplotlib. Gary R. Giorgio F. Gilestro wrote: A really great IDE for windows users is pyScripter ( http://mmm-experts.com/Products.aspx?ProductId=4 ) It's probably the best I could try so far (and it's free). cheers On 3/30/07, Tim Hirzel [EMAIL PROTECTED] wrote: As for a good IDE. I really like eclipse with pydev. For easy student/beginner setup, easyclipse has a nice python eclipse distribution http://www.easyeclipse.org/site/distributions/index.html I think I've tried near every python IDE setup out there over the last couple years, and this one wins for me. tim - 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 - 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
As for a good IDE. I really like eclipse with pydev. For easy student/beginner setup, easyclipse has a nice python eclipse distribution http://www.easyeclipse.org/site/distributions/index.html I think I've tried near every python IDE setup out there over the last couple years, and this one wins for me. tim - 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