[Matplotlib-users] matplotlib.figure and basemap

2010-02-05 Thread nbv4
I wrote a bunch of graph scripts for creating on-the-fly line plots with django. Since I'm running the site on a low memory VPS, I need to run apache in multi-threaded mode, which means all my code needs to be thread-safe. I was using Pyplot a lot, which is not thread-safe. A solution I came up

[Matplotlib-users] automatic date formatting of axes

2010-01-20 Thread nbv4
http://pastebin.com/f7fba9f61 I wrote this little snippet to automatically format the X axis of a line plot I created with a dynamic range. It's not completely 100% perfect, but I thought Id just post this here is anyone wants to use it, or maybe even knows of another method to create the same

[Matplotlib-users] dynamically setting the height of a barh plot

2009-10-31 Thread nbv4
I'm trying to create a dynamically generated png of an arbitrary number of barplots. The height of the png should correspond with the number of plots that are made. In jpGraph this is very easy. All you have to do is set the height of the image to top-margin + (number_of_bars * width_of_bars) +

[Matplotlib-users] can't get basemap working: undefined symbol: PyUnicodeUCS4_DecodeUTF8

2009-09-13 Thread nbv4
, copyright, credits or license for more information. (InteractiveConsole) from mpl_toolkits.basemap import Basemap /home/nbv4/lib/python2.6/dbflib/dbflib.py:2: RuntimeWarning: Python C API version mismatch for module dbflibc: This Python has API version 1013, module dbflibc has version 1012. import

[Matplotlib-users] rate of change for a splice of data

2009-09-09 Thread nbv4
I have a large array that looks like this: vals=[0,0,1,3,2,1,0,4,2,4,2...] dates = [datetime.date(...), datetime.date(...)...] which then is transformed into a cumsum: acc_vals = np.cumsum(vals) and then that is sent to maplotlib to be graphed. The resultant graph looks like this:

[Matplotlib-users] How to do accumulation plots with matplotlib

2009-09-05 Thread nbv4
Hi, I am a new user to matplotlib. I have a huge list of values that look like this: [1,0,0,0,2,3,2,1,0,0,0,2,2,1,3,0,0,3...] each point basically represents the derivative of the line at that point, if that makes any sense. I want to take this data and display it in a linegraph as if it were

Re: [Matplotlib-users] How to do accumulation plots with matplotlib

2009-09-05 Thread nbv4
Jouni K. Seppänen wrote: nbv4 cp368...@ohiou.edu writes: [1,0,0,0,2,3,2,1,0,0,0,2,2,1,3,0,0,3...] [...] I want to take this data and display it in a linegraph as if it were this data: [1,1,1,1,3,5,7,8,8,8,10,12,13,16,16,16,19,...] You can use numpy.cumsum to transform your data