On Jun 10, 2010, at 1:30 PM, Christoph Gohlke wrote:
>
>
> On 6/10/2010 10:14 AM, Pierre GM wrote:
>> On Jun 10, 2010, at 12:51 PM, Jeff Whitaker wrote:
>>> On 6/10/10 10:40 AM, Pierre GM wrote:
>>>> All,
>>>> Sorry, it's been a while sinc
On Jun 10, 2010, at 12:51 PM, Jeff Whitaker wrote:
> On 6/10/10 10:40 AM, Pierre GM wrote:
>> All,
>> Sorry, it's been a while since I've been using Basemap. I was just trying to
>> update my local svn directory to r8403 and reinstall basemap, but an import
&
On Oct 27, 2009, at 2:37 PM, Piter_ wrote:
> Hi all.
> I have a problem with loading file of following format:
> first 1024 rows are tab delimited and contain from 2 to 256 elements
> (in different files different number of columns)
> after that 5 empty lines
> and at the end some 20 text line
On Oct 16, 2009, at 2:59 PM, Ryan May wrote:
> On Wed, Oct 14, 2009 at 3:59 PM, John Hunter
> wrote:
>> I don't have a strong opinion on this -- making it more customizable
>> is a good thing -- this came up at scipy as well, where I contributed
>> a patch to make the AutoDateFormatter a littl
On Sep 19, 2009, at 12:55 PM, Pierre GM wrote:
> All,
> I'm trying to use the Cocoa backend on Snow Leopard, using r7791
> (GCC 4.2.1 / Python 2.6.1 from Apple, 64b)
> Unfortunately, a simple `plot(range(10),range(10))` gives me an
> empty window and error message as su
All,
I'm trying to use the Cocoa backend on Snow Leopard, using r7791 (GCC
4.2.1 / Python 2.6.1 from Apple, 64b)
Unfortunately, a simple `plot(range(10),range(10))` gives me an empty
window and error message as such:
Python[53010:d07] Inconsistent set of values to create NSBitmapImageRep
/User
On Jul 15, 2009, at 6:54 PM, Dr. Phillip M. Feldman wrote:
> leaving the x-axis alone, or vice versa, or set a lower limit for
> the y-axis
> but leave the upper limit alone. Is there a clean way of doing
> this? (I
> have not been able to find anything relevant in the Matplotlib Users
> Gu
Eh, can I play ?
* Something I'd really like to see is a way to access a given patch/
line/collection/... by a string (a name) instead of having to find the
corresponding element in a list. That would mean converting lists into
dictionaries, or at least provide a way to map the list to a dicti
On Jun 23, 2009, at 6:01 PM, Jeff Whitaker wrote:
>>
> Pierre: Doing what you suggest (having Basemap.__init__
> automatically set self.ax to the current axes) will break pickling,
> so I can't do that.
Oh, I'm sorry for the misunderstanding: I never suggested that
Basemap.ax should be se
All (and Jeff W. in particular),
It's the time of the year where I have to draw maps in batch. I wrote
a script to process some data recorded at various stations,
interpolate the data on a grid, draw the corresponding contours on a
basemap, add a colorbar, and end with adding some extra info
Anton,
You may wanna check on the numpy list as well.
I recently reimplemented a function to read text file as a combination
of numpy.loadtxt and mlab.csv2rec, that handles missing data nicely.
You can get it here for the moment:
https://code.launchpad.net/~pierregm/numpy/numpy_addons
The funct
FYI, I recoded np.loadtxt to handle missing data, automatic name
definition and conversion functions, as a merge of np.loadtxt and
mlab.csv2rec. You can access the code here:
https://code.launchpad.net/~pierregm/numpy/numpy_addons
Hopefully these functions will make it to numpy at one point or
On Dec 8, 2008, at 1:09 AM, Roy H. Han wrote:
> I figured it out.
> Specifically, I need to use pylab.Axes(figure, [left, bottom, width,
> height]) where each value in the frame is between 0 and 1
> [.2,.1,.7,.8]
> means
> 20 percent margin on left
> 10 percent margin on bottom
> 10 percent mar
Søren,
Why wouldn't you allocate a 'zorder' to each mask, corresponding to a layer
nb. That way, if a same pixel is shared by 2 masks or more, you take the one
with the highest zorder.
That could be done as easily as definind a `maskstack` list, with element `i`
the mask with zorder `i`.
Now, th
On Monday 27 October 2008 18:40:07 marcusantonius wrote:
> I'm sorry for this newbie question. I have a data file consisting of 3
> columns, and want to plot the first versus the second column, but only if
> the parameter in the third column lies in a certain range. Does somebody
> have an idea how
Mathew,
Have you tried the solution that was suggested by Angus yesterday on the numpy
mailing list ?
http://projects.scipy.org/pipermail/scipy-user/2008-February/015418.html
>>> import numpy as np
>>> import matplotlib.nxutils as nxutils
>>> polygon=np.array([(0,0),(0,1),(1,1),(1,0)])
>>> point
Marjolaine,
Getting rid of rows/columns in your case might be a bit tricky, as there's
nothing to ensure that your domain is actually square.
First, create your mask:
lon_mask = (lon >= min_lon) & (lon <= max_lon)
lat_mask = (lat >= min_lat) & (lat <= max_lat)
glb_mask = lon_mask & lat_mask
glb_
On Wednesday 06 August 2008 09:24:18 Michael Droettboom wrote:
> (I don't know if the
> new masked arrays have a C API we could use -- the old ones apparently
> didn't.)
They don't. I thought about it before, but decided to forget about it until I
could find a job where I could learn C and foc
On Saturday 07 June 2008 16:04:13 Samuel M. Smith wrote:
> Numpy is installed in /Library/Frameworks/Python.framework/Versions/
> 2.5/lib/python2.5/site-packages/numpy
> Numpy version 1.1.0
> /Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/site-
> packages/numpy/core/ma.py:609: Use
On Tuesday 08 April 2008 10:46:32 Bryan Fodness wrote:
> I am starting with a zero array, populate it according to some
> condition, save the graph, and then reset the array to zero. Can
> someone tell me if there is a better (faster) way to do this?
My 2c:
* Use inplace addition to save some s
Chris,
Why wouldn't you try to use sorted on your dictionary, construct an array from
the result of sorted, and get the corresponding columns ?
>>>ddict={date(2008,01,01):10,date(2008,01,03):20,date(2008,01,02):30}
>>>results=numpy.array(sorted(ddict.iteritems()),)
>>>print results[:,0]
>>>[2008
On Wednesday 26 March 2008 07:16:37 Troels Kofoed Jacobsen wrote:
> Hi.
>
> Does anyone know how to save and load an arbitrary object (e.g a numpy
> array) to a file, and load it again?
Have you tried to pickle your object w/ cPickle ?
-
Chris,
My 2c:
Your data is indexed in time, right ? Your x-axis is a date object ? Then use
scikits.timeseries
http://scipy.org/scipy/scikits/wiki/TimeSeries
That package was designed to take missing dates/data into account. That way,
you can plot your data with the gaps already taken into accoun
On Tuesday 18 March 2008 16:17:08 Eric Firing wrote:
> Chris Withers wrote:
> > Eric Firing wrote:
> You should use numpy.masked_where(numpy.isnan(aa), aa).
or use masked_invalid directly (shortcut to masked_where((isnan(aa) |
isinf(aa))
> > I only wish that masked_equal didn't blow up when aa
Michael,
Give scikits.timeseries a try. It's a package designed to handle time series,
with or without missing data or dates, for which matplotlib functions are
also available.
http://scipy.org/scipy/scikits/wiki/TimeSeries
The problem you're refering to (missing dates) is trivial with this pack
On Tuesday 12 February 2008 12:07:21 Michael Frauens wrote:
> I am using span selector to identify an area and then highlight in in
> green. I want the user to be able to validate this (or not) and then
> select another area (or not). However, when the user selects the alternate
> area I want the
On Sunday 10 February 2008 13:23:13 David Trémouilles wrote:
> Thank you very much Pierre!
> You made me discover boolean index (numpy is fantastic !)
> In the mean time, I now understand the purpose of maskedarray that I
> totally missed at a first sight.
You're quite welcome. Masked arrays are g
On Sunday 10 February 2008 12:40:38 David Trémouilles wrote:
> I have a slightly different objective: I just want to remove outliers
> from my curves. I think I will still play with maskedarray and used the
> compressed() function before 'sending' to matplotlib.
> Any comments on that, any other i
On Monday 04 February 2008 12:28:21 jlu wrote:
> Are there any plans to add to hist() the ability to do non-bar style
> histograms? I mean something like the following:
What about using plot w/ linestyle='steps' ? Or change the linewidth to 0 in
bar
--
On Wednesday 23 January 2008 14:57:26 Jim Vickroy wrote:
> Hello users,
>
> I'm using matplotlib.toolkits.basemap.Basemap to plot data on several
> types of projections at a regular cadence. I am presently regenerating
> the maps each time new data is to be plotted. Is it possible to
> generate t
On Friday 02 November 2007 15:10:15 Michael Hearne wrote:
> Is there an easy way to do this with matplotlib/basemap tools?
I'm afraid that not.
Your problem is that you need to find for each cell of your gridded data
whether you are on land or in an ocean, and mask the corresponding cell in
the
On Friday 02 November 2007 11:51:55 Michael Hearne wrote:
> 2) Has anyone figured out a way to make an _ocean_ mask? I need my
> map to look like this
Assuming that you have gdal installed, you can use this set of functions.
Basically, you use OGR to compute the differences between the backgroun
On Tuesday 09 October 2007 20:08:29 Adam Mercer wrote:
> On 09/10/2007, Jeff Whitaker <[EMAIL PROTECTED]> wrote:
> > Adam: If you can convert your coordinates into latitudes and
> > longitudes, then you can plot the data with the basemap tookit on your
> > choice of map projection (see
> > http://
On Tuesday 04 September 2007 17:53:56 Johann Cohen-Tanugi wrote:
> Jouni,
> thanks for your reply.
> I could test that
> plot([1,2,3],[1,2,3])
> setp(gca(), 'xlim', (3.0,1.0))
> works,
> but
> setp(gca(), 'xlim', reversed(getp(gca(), 'xlim')))
Johann,
You may find it easier to use methods inste
On Wednesday 29 August 2007 10:02:14 John Morgan wrote:
> I have some data, which I'd like to plot using matplotlib. Some of the data
> has been flagged by some other software, and I have a boolean array, the
> same shape as my original data which tells me which data has been flagged
>
> I'm
On Wednesday 18 July 2007 07:11:04 Darren Dale wrote:
> Here is another way, with numpy arrays:
>
> data[data==0]=nan
My 2c:
That won't work if data is int_, as nan will be treated as 0.
I'm fairly partial to masked arrays...
---
On Sunday 24 June 2007 20:45:09 Rodrigo López Negrete de la Fuente wrote:
> I've been trying to generate certain plots, but sometimes I get strange
> additions to the yticks in the plots. I've been wondering if there is a way
> to force matplotlib to not do that, and only use multiplicative correc
On Thursday 21 June 2007 17:15:01 Eric Firing wrote:
> trans = blend_xy_sep_transform( self.transData, self.transAxes )
>
> where "self" in this case is the axes instance, so you would use "ax" or
> whatever. Then, since the collection is an artist, you can use its
> inherited set_transform(tran
All,
I need to plot stripes of different widths at different locations along the x
axis, but spanning the whole range of y data. Using axvspan in a loop works
quite fine. However, I was wondering whether it wouldn't be more efficient to
build a PatchCollection.
BrokenBarHCollection could be a c
On Wednesday 11 April 2007 03:28:09 elekis wrote:
Hi,
Just some quick comments:
1. learn list comprehensions, they're far faster than regular loops.
data = [(i,j,int(numpy.random.random()*10))
for i in range(XI) for j in range(JI)]
2. if you don't really need the triplets, but j
On Tuesday 27 March 2007 16:27:35 C M wrote:
> ValueError: time data did not match format: data=2003-12-01 fmt=%d-%b-%y
>
> Any idea what I'm doing wrong?
Well, if data='2003-12-01', the format should be "%y-%m-%d" or "%y-%d-%m"
depending on the local convention. Here, 2003 is interpreted as a
The problem was a use of (Numeric) MA with numpy. Pointing towards
matplotlib.numerix.ma solved the issue.
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance t
On Wednesday 07 March 2007 14:43:45 [EMAIL PROTECTED] wrote:
> Anyone knows which of my package (MA, numpy, ...) might be causing the
> conflict? I could go back to the older version (on another machine), but I
> really like it to work in the newer version. Any inputs would be
> appreciated.
Hell
On Friday 02 March 2007 14:12:24 John Hunter wrote:
> I still am not able to make my mock-up custom python class work as I
> would like with asarray (though it works with "list"). What am I
> missing? The way I read it this appears to be in support of extension
> code that wants to expose the ar
Folks,
I have a problem with xaxis_date in the SVN (rev2994)
#--
def xaxis_date(self, tz=None):
"""Sets up x-axis ticks and labels that treat the x data as dates.
tz is the time zone to use in labeling dates. Defaults to rc value.
"""
thislocator = self.xa
On Monday 08 January 2007 04:34, Gerhard Spitzlsperger wrote:
> Dear All,
>
> I am quite new to matplotlib and facing some trouble using boxplots.
>
> I'd like to plot two boxes (different length of data) in one plot, from
> the docs
> Could you point me to what I do wrong? I need especially
> the
On Monday 25 December 2006 01:30, Eric Firing wrote:
> I don't think so--at least, I have not figured it out after a few
> minutes of looking around and trying to understand how things work. I
> think polar plotting needs quite a bit of work.
Sorry for hijacking the thread, but a few months ago
On Monday 18 December 2006 13:29, David L Goldsmith wrote:
> Simson Garfinkel wrote:
> > It really depends on your audience as to whether or not 1,000,000
> > through 9,000,000 is better displayed in scientific notation or not.
> > For audiences that I frequently present to, any scientific notation
On Saturday 16 December 2006 16:02, Eric Firing wrote:
> It sounds like the real problem is that the initial use of asarray in
> boxplot is a bug--it should transparently support an object array, as
> you suggest (but numpy only), or an ordinary array, *or* a list or tuple
> of data vectors, and al
Sergio,
I think the line you see comes from plotting two shape on top one another. You
may want to redefine your polygon:
the easier would be something like:
tt = concatenate((t,t[::-1]))
vtx = concatenate((s3,s2[::-1]))
fill(tt, vtx, '#e9ccce', linewidth=0)
With the first command, you build a s
On Saturday 16 December 2006 13:47, Simson Garfinkel wrote:
> > I apologize if I offended anyone, this was really not my intention
> > at all.
>
> Oh, I was never offended.
Thanks a lot for your patience nevertheless.
> I think that it's possible to get impressive results in a few hours,
> but no
On Saturday 16 December 2006 13:01, David Chin wrote:
> On 12/16/06, Simson Garfinkel <[EMAIL PROTECTED]> wrote:
> > Thanks. I have roughly 30 years of programming experience and know
> > something like 20+ languages. The learning curve here is steep, and I
> > think that a lot could be done to ma
> And for the work I'm doing, I have a
> different number of observations and data points on different days,
> so it's a pain that the current boxplot infrastructure expects all of
> the boxes to be in a single array. Hence my questions.
Ah OK, now I get it. Sorry for being a bit slow today.
So ye
> I want multiple boxes on a single plot, with one box per day. Take a
> look at how I've done it with just plot() and some error bars...
I'm still not sure I understand where the problem is:
You want several boxes in a plot ?
Something along the lines of what I already sent you ?
> boxplot([set1
> Hi, Pierre. There's a lot of assumptions here.
Indeed, and I apologize
> I sort of know what numarray, Numeric and numpy are, but I don't care
> all that much. I'm just interested in matplotlib for the plotting.
Well, matplotlib relies on some packages to handle data arrays. It's probably
a goo
> I'd love to speak python to it. But it's harder when all of the
> examples are in matlab...
:)
Well, please have a look to pythonic_matplotlib.py in your examples folder.
> > fig = figure()
> > ax1 = fig.add_subplot(121)
> > ax2=fig.add_subplot(122)
>
> Hm. I'll need to figure out why these t
> I'm very confused by the wiki in general. I click on "wiki" and it takes me
> to something that doesn't obviously have anything to do with matplotlib...
Well, it does say: matplotlib cookbook.
> Like, what's scipy.org? Is it a company? Who is EnThought?
Oh.
What are you using to manipulate arra
On Friday 15 December 2006 21:07, Simson Garfinkel wrote:
> Hm. thanks for the info. But it's not perfect... I get times in my
> formats, but not the dates. Here is the sample code:
Yeah, I agree, the situation is far from ideal. Besides, it turns out that
there's no deep magic behind have_dates,
> 2. I need to have the X axis of the boxplot be dates. There doesn't
> seem to be an easy way to do that.
Use the "position" keyword, as a list of date ordinals (output of date2num).
Then, use
gca().xaxis_date(tz)
where tz is your current timezone (you can use None, that's easier).
Et voi
On Tuesday 12 December 2006 06:57, John Travers wrote:
> Hi, I'm struggling to get an array plotted the way I want with imshow.
> I have an array A which i try to plot with
>
> e=(tdims[0], tdims[-1], wldims[-1], wldims[0])
> imshow(A,extent=e)
>
> if I set extent correctly, the image is scaled
>
Folks,
Would it be possible to switch the current error message
>>> ValueError: Arguments x, y, z, mask (if present) must be 2D arrays.
in cntr.c to something more explicit, when x, y, and z are 2D arrays, but one
of them is complex ? Or force a downcast to float if needed ?
(I know, I should
Talking about pcolormesh:
I was just playing with it right now, and it doesn't accept the 'shading'
keyword. Poking around shows that kwargs.pop('shading','flat') should be
used instead of kwargs.get('shading') in axes.py (same goes for the other
parameters...)
On Saturday 02 December 2006 17:39, Simson Garfinkel wrote:
> Hi. I'm interested in creating a date plot showing bandwidth along a
> link. I want to have a dot in the center of each date with the
> average bandwidth and use the error bars to show the 25th and 75th
> percentiles. I've been trying to
Teemu
> Any ideas where the conflict might be coming from?
When you type from MA import *, you overwrite the definition of 'array'. And
surprisingly enough, a masked array in numpy.core.ma is an object
independent of ndarray. Some functions such as swapaxes are not imported by
MA (because they
On Friday 24 November 2006 15:14, Darren Dale wrote:
> Or, you can change the formatter of your yaxis to OldScalarFormatter, which
> renders the scientific notation in each tick label, rather than at the top
> of the axis.
Thinking about it: is there a way to grab this scientific notation ? The i
> How could I avoid this overlapping?
What about deleting your first tick on ax2, with
>>> ax2.set_xticks(ax2.get_xticks()[1:])
at the end of your code ?
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForg
On Tuesday 21 November 2006 22:09, Stephen George wrote:
> Thank you Pierre,
>
> I've taken a while to get around to it, but this code worked a treat,
> and taught me a little about how I can override things in matplotlib
Glad you found it useful.
playing some more about it, I realized that there
On Thursday 16 November 2006 23:45, Josh Lifton wrote:
> I've been having problems using the subplot command's comma notation
Seems to work here. On a Gentoo (OK, seriously: on matplotlib 0.87.7)
Josh, what version of matplotlib are you using ?
---
Ciao Sarah
> cross_correlate, but given two arrays, that function returns a single
> scalar value (whereas I was expecting a list of correlation
> coefficients corresponding to how well the two signals match on
> successive lags).
That's not really a mpl question, more a 'numerix' one: what does y
> My basic question: Is it possible to remove a data series from a matplotlib
> plot?
A quite similar question was asked yesterday:
The lines are stored in "ax.lines", by chronological order. If you want to
delete the second one, just use del(ax.lines[1]), and redraw if needed.
> I have a GUI written in wxPython, the main portion of it is a
> matplotlib canvas. There is a tree control on the left with
> checkboxes: if the user checks a checkbox, I add a line on the plot.
> So far so good. The problem comes when the user *un-checks* the
> checkbox. I would like to remove
>>> hist?
...
Docstring:
HIST(x, bins=10, normed=0, bottom=0,
align='edge', orientation='vertical', width=None, **kwargs)
Compute the histogram of x. bins is either an integer number of
bins or a sequence giving the bins. x are the data to be binned.
The return values is
On Tuesday 07 November 2006 04:49, Bart van Kuik wrote:
> I have created plots, but I find the line style is a bit "vague". The
> line isn't one sharp, contrasting color, but smoothly blended to the
> background. Is the correct term anti aliasing?
Seems like it. Make sure the 'antialiased' propert
> One thing I cannot work out is the axis number presentation.
> Cannot find any documentation about how to control the presentation of
> the axis number.
Poke around ticker.formatter
> However I would prefer it would present in enginering notation (10, 100,
> 1e3, 10e3, 100e3, 1e6, 10e6 ...etc)
On Tuesday 20 June 2006 11:37, John Hunter wrote:
> >>>>> "Pierre" == Pierre GM <[EMAIL PROTECTED]> writes:
>
> Pierre> Folks,
> Pierre> I have a tailor-made subclass of Figure (say, MyFigure) that I'd
> Pierre> like
Folks,
I have a tailor-made subclass of Figure (say, MyFigure) that I'd like to use
interactively. Ideally, I'd like to have pylab.figure() (or an equivalent)
create a MyFigure instance, instead of Figure.
I wrote a myfigure() function based on pylab.figure(), substituting the
-
figManager =
76 matches
Mail list logo