Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread Paul Ivanov
C M, on 2011-01-27 02:03, wrote: > > 3) I am getting just hammered with the following error *a lot* in date > > plotting lately: > > > > ValueError: ordinal must be >= 1 > > > OK, I made up a small runnable sample to show this with bar(). (Using > code that someone else wrote[1]). This code ru

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
> 3) I am getting just hammered with the following error *a lot* in date > plotting lately: > > ValueError: ordinal must be >= 1 OK, I made up a small runnable sample to show this with bar(). (Using code that someone else wrote[1]). This code runs when using plot_date(), but if you comment that

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
On Wed, Jan 26, 2011 at 9:16 PM, Jae-Joon Lee wrote: > On Thu, Jan 27, 2011 at 10:07 AM, C M wrote: >> I know the 2nd problem is that a dictionary cannot have a mutable >> object like a list as a key.  But previously, as I said, I was able to >> call line, (with the comma) and it would work.  In

Re: [Matplotlib-users] Plot to display or file in the same script?

2011-01-26 Thread David Perlman
The problem is that if no display is available, the error gets raised on the point where I try to create a new figure, long before getting to show(), so I can't do anything at all. Here's what it looks like when I log in without a display available: >>> import matplotlib.pyplot as plt >>> plt.f

Re: [Matplotlib-users] Plot to display or file in the same script?

2011-01-26 Thread Benjamin Root
On Wednesday, January 26, 2011, David Perlman wrote: > I'm trying to make a simple utility for doing a quick check of some data > (electrophysiology recordings from our fMRI scanner lab).  I want it to be > foolproof as much as possible, so I was trying to figure out how to write a > script tha

[Matplotlib-users] Plot to display or file in the same script?

2011-01-26 Thread David Perlman
I'm trying to make a simple utility for doing a quick check of some data (electrophysiology recordings from our fMRI scanner lab). I want it to be foolproof as much as possible, so I was trying to figure out how to write a script that would try to plot to the display, then if that didn't work,

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread Jae-Joon Lee
On Thu, Jan 27, 2011 at 10:07 AM, C M wrote: > I know the 2nd problem is that a dictionary cannot have a mutable > object like a list as a key.  But previously, as I said, I was able to > call line, (with the comma) and it would work.  In fact, line, with a > comma gives this type: > If you just

Re: [Matplotlib-users] Zooming into plots?

2011-01-26 Thread Soumyaroop Roy
Hi Ben: That's encouraging! I want to be able plot up to N data points (the points are in an ordered sequence) on a canvas and then zoom into the plot region enclosed within a subset sequence (e.g., T1 to T2 data points, 0 <= T1 < T2 <=N) by putting two cursors - one on T1 and the other one on T2

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
> Just a thought, are you trying out the new legend code? I don't know if I am or not. But these problems are prior to any code regarding the legend. > Could you do a print of the type for bars? When I write it as just bars without the comma it is: bars type = If I write it with the comma (

Re: [Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread Benjamin Root
On Wednesday, January 26, 2011, C M wrote: > I usually do this for line graphs with markers: > >    line, = self.subplot.plot_date(dates,data) > > along with some keywords to tweak the plot.  I then add line to a > dictionary to keep track of it: > >    self.line_to_data_dict[line] = self.activi

Re: [Matplotlib-users] Zooming into plots?

2011-01-26 Thread Benjamin Root
On Wednesday, January 26, 2011, Soumyaroop Roy wrote: > Hi there: > > Does matplotlib have provide any feature to allow zooming into plot > regions like a waveform viewer does? > > regards, > Soumyaroop > Mpl offers full control of the plot display. Maybe if you offer an example of what you are

[Matplotlib-users] Bug in dviread?

2011-01-26 Thread Alex
Hello to all, using a standard python install on Ubuntu 10.04 the example fails to produce a figure. Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import matplotlib >>> matplotlib.__version__ '0.9

[Matplotlib-users] too many values to unpack with a bar chart

2011-01-26 Thread C M
I usually do this for line graphs with markers: line, = self.subplot.plot_date(dates,data) along with some keywords to tweak the plot. I then add line to a dictionary to keep track of it: self.line_to_data_dict[line] = self.activity But today I tried this with a bar chart, just changin

Re: [Matplotlib-users] How to draw a specific country by basemap?

2011-01-26 Thread Thomas Lecocq
Hi, An easy way is to use the data from http://www.gadm.org/ and to plot it with m.readshapefile() HTH, Thom ** Thomas Lecocq Geologist Ph.D.Student (Seismology) Royal Observatory of Belgium ** Date: Wed, 26 Jan 2011 16:03:27 +0800 From: eric.l.2...

Re: [Matplotlib-users] colorbar+log+latex

2011-01-26 Thread Shrividya Ravi
Hi All, Thanks a bunch for your help! Eric: your suggestion works brilliantly ( I didn't use the interpolation kwarg though because I like the 'smudged' look). Paul: thanks for your suggestions but I get errors when trying to execute > * cbar.set_ticks(np.linspace(300,350,6))*. The c.bar.set_ticks

[Matplotlib-users] Zooming into plots?

2011-01-26 Thread Soumyaroop Roy
Hi there: Does matplotlib have provide any feature to allow zooming into plot regions like a waveform viewer does? regards, Soumyaroop -- Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)! Finally, a wo

[Matplotlib-users] How to draw a specific country by basemap?

2011-01-26 Thread Eric Liang
Hi all, I'm using the Basemap module in matplotlib, it's great to draw a world map but for a specific country. Empirically, one can draw its own country by specifying the lats and longs like this example: http://matplotlib.sourceforge.net/basemap/doc/html/users/geography.html And you can use