Re: [Matplotlib-users] TypeError when plotting dates on Windows 32 bit

2012-03-14 Thread Aman Thakral
On Wed, Mar 14, 2012 at 2:16 PM, Aman Thakral wrote: > I recently upgrade to Python 2.7 (I used EPD Free for the install which > comes with matplotlib 1.1.0) and I'm getting the following error when I try > to plot dates. I've tried a few different backends, but they all seem

[Matplotlib-users] TypeError when plotting dates on Windows 32 bit

2012-03-14 Thread Aman Thakral
I recently upgrade to Python 2.7 (I used EPD Free for the install which comes with matplotlib 1.1.0) and I'm getting the following error when I try to plot dates. I've tried a few different backends, but they all seem to give the same error. I had no issues using Python 2.6 up to now. I think th

Re: [Matplotlib-users] it is possible to use basemap to create regular spaced lat/lon grids?

2011-09-06 Thread Aman Thakral
Hi Matt, Something like this?: def create_map(ax, llcrnrlon,llcrnrlat,urcrnrlon,urcrnrlat): m = Basemap(llcrnrlon=llcrnrlon,llcrnrlat=llcrnrlat,urcrnrlon=urcrnrlon,urcrnrlat=urcrnrlat,resolution='i',projection='cyl',lon_0=(urcrnrlon+llcrnrlon)/2,lat_0=(urcrnrlat+llcrnrlat)/2) m.drawcoastl

Re: [Matplotlib-users] Plotting using Basemap and FigCanvasAgg with Matplotlib on a web server

2011-08-25 Thread Aman Thakral
OK, so it seems to be working if I use fig=plt.figure() instead of fig = Figure() but I'm not sure why this is the case. -Aman On Thu, Aug 25, 2011 at 10:50 AM, Aman Thakral wrote: > Sorry about that. I've attached a sample script. > -Aman > > > On Wed, Aug 24, 201

Re: [Matplotlib-users] Plotting using Basemap and FigCanvasAgg with Matplotlib on a web server

2011-08-25 Thread Aman Thakral
Sorry about that. I've attached a sample script. -Aman On Wed, Aug 24, 2011 at 9:05 PM, John Hunter wrote: > > > > > On Aug 24, 2011, at 4:09 PM, Aman Thakral wrote: > > > Hi, > > > > I've recently created a web application, using Django, to dyna

[Matplotlib-users] Plotting using Basemap and FigCanvasAgg with Matplotlib on a web server

2011-08-24 Thread Aman Thakral
Hi, I've recently created a web application, using Django, to dynamically create maps from weather data. When I tried using FigCanvasAgg and figure.Figure, the image that was responded by the web server (using canvas.print_png and django.http.HttpResponse) did not show the map, just the scatter p

[Matplotlib-users] Changing the radius of an existing CircleCollection

2011-07-06 Thread Aman Thakral
Hi All, I have a wx application that uses a scatter plot on a map. I am trying to figure out how to change the radius of the circles of the existing scatter plot. My first thought would be to get a list of all the patches within the CircleCollection instance so that I can just call the set_radiu

Re: [Matplotlib-users] making a bar chart with time on xaxis

2011-05-27 Thread Aman Thakral
Hi Amy, Use the vlines() function. Its what I have used in the past. Cheers, Aman On Fri, May 27, 2011 at 12:28 PM, Amy Zhang wrote: > Hello, > > I've created the following chart using matplotlib.pyplot.plot(). However, I > would like to see the data points as bars from the bottom of the graph

Re: [Matplotlib-users] Aspect ratio of a circle

2011-03-09 Thread Aman Thakral
really want to do is add a scale free aspect ratio correct circle to > the plot. Just like the circles that appear on a scatter plot. > > Best regards, > > Mads > > > On 2011-03-09 14:44, Aman Thakral wrote: > > Hi Mads, > > Did you add axis='equal' to you

Re: [Matplotlib-users] Aspect ratio of a circle

2011-03-09 Thread Aman Thakral
Hi Mads, Did you add axis='equal' to you axes command? e.g. ax = fig.add_subplot(111, aspect='equal') -Aman On Wed, Mar 9, 2011 at 6:07 AM, Mads Ipsen wrote: > Hi, > > I am using the Qt4 based back engine for displaying a 2D plot in a > widget. The plot typically contains lots of line plots.

Re: [Matplotlib-users] Basemap interp nearest neighbor

2011-03-07 Thread Aman Thakral
On a similar note, are there any alternatives available to nearest neighbor? For example, kriging? I remember seeing a geostats library in python (hpgl i think), but I found the API rather impractical and difficult to use. Thanks, Aman On Mon, Mar 7, 2011 at 8:23 AM, Jeff Whitaker wrote: > On

Re: [Matplotlib-users] How to create space between two subplots?

2011-02-15 Thread Aman Thakral
Hi Omer, use the subplots_adjust keyword argument (or click on the adjust subplots icon in the navigation toolbar at the bottom of the figure). http://matplotlib.sourceforge.net/api/figure_api.html#matplotlib.figure.Figure.subplots_adjust -Aman On Tue, Feb 15, 2011 at 6:05 AM, Omer Khalid wrot

Re: [Matplotlib-users] matploblib multithreading

2011-02-14 Thread Aman Thakral
Have you looked into Celery? It is a queuing system with Django ORM support. I don't have any experience with it myself, but I have heard good things about it. -Aman 2011/2/14 wukan : > Hi ,When I use matplotlib to draw 2D graphics in django web site,I encounter > a problem. > when server users

[Matplotlib-users] Update individual elements (i.e an artist) for drawing

2011-02-09 Thread Aman Thakral
Hi, I was just wondering, how would I go about redrawing only a single element (i.e. an artist)? I know that matplotlib.artist.Artist has a draw() method that accepts a renderer as the argument. I tried something along the lines of: renderer = fig.canvas.get_renderer() title = ax.set_title("This

Re: [Matplotlib-users] Figure and Canvas

2010-11-12 Thread Aman Thakral
Hi Oliver, Have you looked at any examples on the matplotlib site? For instance, there are several examples about how to use wxPython (wx) with matplotlib. Also, there is a save feature currently available in current gui when you run figure() (it is a floppy disk in navigation panel below the fig

Re: [Matplotlib-users] automatically choose different line markers

2010-11-08 Thread Aman Thakral
n the docs? If not, it would be a useful addition. Seems like a common feature to address. Cheers, Aman On Mon, Nov 8, 2010 at 10:41 PM, Ryan May wrote: > On Fri, Nov 5, 2010 at 8:07 AM, Aman Thakral > wrote: > > Hi, > > > > The best way to do this is to use a genera

Re: [Matplotlib-users] automatically choose different line markers

2010-11-05 Thread Aman Thakral
> http://p.sf.net/sfu/SAP-dev2dev > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- Aman Thakral B.Eng & Biosci, M.Eng Design

[Matplotlib-users] Changing behavior of a Pick Event

2010-09-27 Thread Aman Thakral
Hi, Is there a way to change the way a Pick event occurs? Instead of a mouse click, is it possible to use a mouse hover? I'm just curious because I'm developing a wx application and would like to have a Tooltip over various artists. Thanks, Aman --

Re: [Matplotlib-users] Bring the legend to the front of a plot

2010-09-27 Thread Aman Thakral
he example should be updated. Regards, Aman On Sun, Sep 26, 2010 at 10:48 PM, Jae-Joon Lee wrote: > Please post a sample script (short but complete) that demonstrates your > problem. > > Regards, > > -JJ > > > On Sat, Sep 25, 2010 at 12:41 AM, Aman Thakral > wrot

[Matplotlib-users] Bring the legend to the front of a plot

2010-09-24 Thread Aman Thakral
Hi all, I'm using a draggable legend (class, not function) with axes splines. Whenever I plot the legend using the host axes, the legend appears to behind all of the lines. I want the user to be able to drag the legend but I cannot select it when its inside the axes. If I move it outside the axes

Re: [Matplotlib-users] Mouse event blocked in 1.0 but works with 0.93 ?

2010-09-23 Thread Aman Thakral
Hi David, I'm using the pick event in wx (matplotlib 1.0) without any issues. Could you please post some sample code? Have you tried to see if legend.draggable() works? If so, the pick event is likely not an issue. -Aman On Thu, Sep 23, 2010 at 4:20 AM, David Trémouilles wrote: > Hello, > >

Re: [Matplotlib-users] matplotlib/basemap plot geo data on background map

2010-09-10 Thread Aman Thakral
l appliances > and start using them to simplify application deployment and > accelerate your shift to cloud computing > http://p.sf.net/sfu/novell-sfdev2dev > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > h

Re: [Matplotlib-users] matplotlib import warning

2010-09-08 Thread Aman Thakral
programming skills. > Enter the Intel(R) Threading Challenge 2010. > http://p.sf.net/sfu/intel-thread-sfd > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > -- Aman Thakral B.Eng & Biosci,

Re: [Matplotlib-users] Span Selector and Rectangular Selector in wxpython on Windows

2010-09-08 Thread Aman Thakral
Sorry, This was just a silly mistake. I forgot declare the selectors as class variables (by adding self in front of them). -Aman On Tue, Sep 7, 2010 at 1:37 PM, Aman Thakral wrote: > Hi, > > I seem to be encountering a strange problem. I'm using a SpanSelector and > a Recta

[Matplotlib-users] Span Selector and Rectangular Selector in wxpython on Windows

2010-09-07 Thread Aman Thakral
Hi, I seem to be encountering a strange problem. I'm using a SpanSelector and a RectangularSelector in my application and they seem to be working in Linux but not in Windows. I'm using wxpython as the gui layer. Has anyone else encountered similar issues? Thanks, Aman ---

Re: [Matplotlib-users] Map displayed on a plot

2010-08-27 Thread Aman Thakral
millions of netbook users > worldwide. Take advantage of special opportunities to increase revenue and > speed time-to-market. Join now, and jumpstart your future. > http://p.sf.net/sfu/intel-atom-d2d > ___ > Matplotlib-users mailing lis

Re: [Matplotlib-users] Labeling/distinguishing lots of curves on a single plot

2010-08-23 Thread Aman Thakral
Hi John, Here is a simple way to do it. import matplotlib.pyplot as plt import numpy as np fig = plt.figure() ax = fig.add_subplot(111) colors = ('red','green','blue','yellow','orange') linestyles = ('-','--',':') linewidths = (0.5,2) y = np.random.randn(100,30) x = range(y.shape[0]) i = 0 fo

Re: [Matplotlib-users] Screenshot on homepage

2010-08-12 Thread Aman Thakral
7;t live without > Enter the BlackBerry Developer Challenge > http://p.sf.net/sfu/RIM-dev2dev > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.ne

Re: [Matplotlib-users] Text drawing outside plotting area when zoomed in

2010-07-22 Thread Aman Thakral
Sorry, that was a silly question. I just set the clip_on to True to fix this. On Thu, Jul 22, 2010 at 1:45 PM, Aman Thakral wrote: > Hi all, > > The text draws outside the plotting area when you zoom in. Sample code is > attached. To re-create the issue, just use the zoom rect fun

[Matplotlib-users] Text drawing outside plotting area when zoomed in

2010-07-22 Thread Aman Thakral
Hi all, The text draws outside the plotting area when you zoom in. Sample code is attached. To re-create the issue, just use the zoom rect function on the plot. Is there a way to fix this? Thanks, Aman text_issue.py Description: Binary data ---

Re: [Matplotlib-users] Potential Bug with SpanSelector

2010-07-21 Thread Aman Thakral
ta is None: y = event.ydata else: y = self.prev[1] I know it's a bit verbose, but it works. Thanks, Aman On Wed, Jul 21, 2010 at 2:44 PM, Aman Thakral wrote: > Update on the error. > > It occurs in the following cases: > - User clicks and drags from left to right and appr

Re: [Matplotlib-users] Potential Bug with SpanSelector

2010-07-21 Thread Aman Thakral
e if I can fix it. I'll welcome any input you guys can provide though. Thanks, Aman On Wed, Jul 21, 2010 at 1:58 PM, Aman Thakral wrote: > Hi all, > > I'm getting the following exception when I use the Span Selector. It > happens when I try and select the entire region. &

[Matplotlib-users] Potential Bug with SpanSelector

2010-07-21 Thread Aman Thakral
Hi all, I'm getting the following exception when I use the Span Selector. It happens when I try and select the entire region. Exception in Tkinter callback Traceback (most recent call last): File "C:\Python26\lib\lib-tk\Tkinter.py", line 1410, in __call__ return self.func(*args) File "C

[Matplotlib-users] Update Colorbar

2010-07-12 Thread Aman Thakral
Hi, Is there a way to get the current colorbar (or a list of colorbars) for the current axes and update the mappable property? If an update is not possible, i would like to replace the current colorbar with a new one. I've tried something similar to the following: import pylab as plt fig = plt.

Re: [Matplotlib-users] Updating Scatter Plot data

2010-07-07 Thread Aman Thakral
x27;t really seem like an optimal way of doing this though. -Aman On Wed, Jul 7, 2010 at 4:36 PM, Aman Thakral wrote: > Hi, > > I was just curious if there is a way to update the data for a scatter plot > similar to the set_data function for a axes.plot object? The reason is > becaus

[Matplotlib-users] Updating Scatter Plot data

2010-07-07 Thread Aman Thakral
Hi, I was just curious if there is a way to update the data for a scatter plot similar to the set_data function for a axes.plot object? The reason is because I need to update a scatter plot at various zoom levels and colors/distribution of the circles will change with the zoom level. I looked at

Re: [Matplotlib-users] Adding Streets to a Basemap

2010-07-06 Thread Aman Thakral
Hi Jeff, Thanks for your help. The shapefile works great, but I cannot see the labels. The "DESCRIP" attribute in the shapefile has the labels, but I'm not sure how to apply them to the map. Thanks, Aman On Tue, Jul 6, 2010 at 9:27 AM, Jeff Whitaker wrote: > On 7/6/10 7:0

[Matplotlib-users] Adding Streets to a Basemap

2010-07-06 Thread Aman Thakral
Hi, I have a cylindrical projection that I would like to add some streets on. I only need major highways in southern Ontario, Canada. Is this functionality included in the Basemap package, or would I have to find a customized package/shape file (Openstreet?) ? Thanks, Aman -

Re: [Matplotlib-users] zorder for individual points in a scatter plot on a Basemap

2010-06-29 Thread Aman Thakral
R/PSD1Email : jeffrey.s.whita...@noaa.gov > 325 BroadwayOffice : Skaggs Research Cntr 1D-113 > Boulder, CO, USA 80303-3328 Web: http://tinyurl.com/5telg > > > > -------

[Matplotlib-users] zorder for individual points in a scatter plot on a Basemap

2010-06-29 Thread Aman Thakral
Hi, I'm currently using a scatter plot on a Basemap and I'd like to set the zorder of the individual points based on their temperature. The higher the temperature, the higher the zorder. Also, i'm using a colorbar to set the colors for the plot. Here is a snippet of my code: x =

[Matplotlib-users] zorder for individual points in a scatter plot on a Basemap

2010-06-28 Thread Aman Thakral
#x27;Time Range: %s to %s'%(startDay.strftime("%b-%d %H:%M"),endDay.strftime("%b-%d %H:%M"))) plt.colorbar(shrink=0.5) Is there anyway to set the zorder of the points without using the loop in commented c