Re: [Matplotlib-users] [matplotlib-devel] v1.4.3rc1

2015-02-05 Thread Phil Elson
Awesome work! Full credit to Tom who has driven this release. The nbagg backend is looking great - some pretty swish new features thanks to hard work from Steven Silvester and Thomas Caswell! On 2 February 2015 at 10:58, Jens Nielsen wrote: > Thanks Tom, > > I ran the test suite on OSX 10.10 wi

[Matplotlib-users] Season's greetings from matplotlib

2014-12-24 Thread Phil Elson
tube.com/watch?v=POnAkPpe770. Finally, to all those taking some time off this festive season, I wish you a very happy holiday and wish you all the best for the new year. Phil Elson -- Dive into the World of Parallel Programm

Re: [Matplotlib-users] creating a path from multiple sets of xy coordinates (inner and outer outlines)

2014-12-23 Thread Phil Elson
Does it cut out > vertices / paths that are detected to be inside an outline as the star in > this example? > > -Denis > > > 2014-12-22 12:09 GMT+01:00 Phil Elson : > >> Sorry its taken so long to get an answer, but essentially you want to >> concatenate the

Re: [Matplotlib-users] creating a path from multiple sets of xy coordinates (inner and outer outlines)

2014-12-22 Thread Phil Elson
Sorry its taken so long to get an answer, but essentially you want to concatenate the outer coordinates with the inner ones (reversed) to indicate that it is a hole. There is a pretty (simple) useful example that I added a few years ago for demonstrating the use of paths for markers: http://matplot

[Matplotlib-users] Bloomberg Open source sprint, London, November 29-30 2014

2014-11-26 Thread Phil Elson
There will be an open source Python sprint, hosted by Bloomberg, this weekend in London. The event will be attended by core developers of many of the major scientific Python packages (IPython, numpy, scipy, pandas, scikit-learn) who will act as mentors to those who would like to get involved in the

Re: [Matplotlib-users] FW: traceback when import matplotlib.pyplot twice

2014-10-11 Thread Phil Elson
On 10 October 2014 19:10, Thomas Caswell wrote: > I suspect a better fix is to change all of the staticmethods -> > classmethods +1 -- Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer Achieve PCI DSS 3.0

Re: [Matplotlib-users] xkcd

2014-10-04 Thread Phil Elson
Also note, you can just call plt.xkcd() and it will turn on the setting globally for that session. On 4 October 2014 00:11, Paul Hobson wrote: > That's what the `with` statement allows you do. > > Say you have a function that does some plotting and returns a figure -- > call it my_plot_func. > >

Re: [Matplotlib-users] Basemap: draw parallels/meridians based on rotated pole

2014-05-12 Thread Phil Elson
Hi Maik, Not entirely sure what you're after (a picture may have helped), but I know Basemap has relatively recently added rotated pole coordinate system support which may be of use. I'm not sure how well that goes with the meridian/parallel drawing within Basemap though. Alternatively, if I've u

Re: [Matplotlib-users] Fwd: Strange behaviour on plotting data on Ronbinson projection using Basemap

2014-04-16 Thread Phil Elson
Hi Chao, The warning you are getting: WARNING: x coordinate not monotonically increasing - contour plot may not be what you expect. If it looks odd, your can either adjust the map projection region to be consistent with your data, or (if your data is on a global lat/lon grid) use the shiftgrid f

Re: [Matplotlib-users] Issue with basemap.plot() when lon_0 nonzero

2014-04-16 Thread Phil Elson
Cool notebook. I took the liberty of giving it a go with cartopy, and you can see the results here http://nbviewer.ipython.org/gist/pelson/10822698 I'd agree that the issue you linked to does look very similar to the issue you are seeing, so I think this is very likely a bug. Cheers, On 16 Apri

Re: [Matplotlib-users] Matplotlib for tiles - blank lines

2014-03-24 Thread Phil Elson
I fixed an issue related to this (I too was producing map tiles) in matplotlib v1.2 I believe. The original issue can be found at https://github.com/matplotlib/matplotlib/pull/1591 and so I suggest this might not be an issue with matplotlib >= v1.3. Incidentally, if you are producing map tiles yo

Re: [Matplotlib-users] segmentation fault and / or bus error with script that cranks out plots with TkAgg backend

2014-01-27 Thread Phil Elson
This is a bit of a surprise. Sounds like it could have something to do with matplotlib's build, or that of some of its dependencies, so may need reporting to Gentoo once we've dug a little further. It could be a really tricky one to diagnose without being able to reproduce locally, but - is the loo

Re: [Matplotlib-users] font setting in matplotlib 1.3.1

2014-01-27 Thread Phil Elson
Thanks for this Vlastimil, looks like there is either a subtlety beyond my font knowledge or a bug here - mdboom, did you have any ideas? Otherwise I think we need a github issue for this. Cheers, On 4 January 2014 19:37, Vlastimil Brom wrote: > Hi all, > after upgrading to matplotlib 1.3.1, I

Re: [Matplotlib-users] Remove backgroundimage

2014-01-27 Thread Phil Elson
As with most other artists, you should be able to just call remove on the resulting artist. e.g. im = plt.imshow(...) ... im.remove() HTH On 2 January 2014 11:58, flambert wrote: > Hi, > > Does somebody knows how can I remove a backgroundimage. I set the image > with > imshow. > > regards

Re: [Matplotlib-users] Runtime error

2014-01-27 Thread Phil Elson
Hi Kai, I'm afraid I've never heard of this one. Do you have a full error log? Thanks, On 26 January 2014 02:40, wrote: > > > Hi, > > I'm trying to use matplotlib to generate pictures for my website view. The > framwork I use is pyramid. But I got an error when I try to refresh my page > two

Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-03 Thread Phil Elson
poly = RegularPolygon([ 0.5, 0.5], 6, 0.4, fc='none', >>> ec='k', transform=ax.transAxes) >>> for artist in ax.get_children(): >>> artist.set_clip_path(poly) >>> >>> ax.add_patch(poly) >>> ax.set_aspect('equal')

Re: [Matplotlib-users] Clipping a plot inside a polygon

2013-09-02 Thread Phil Elson
Great question. The contour set itself does not have a set_clip_path method but you can iterate over each of the contour collections and set their respective clip paths, i.e.: cs = plt.contourf(data) for collection in cs.collections: collection.set_clip_path(poly) Of course, you can use this

Re: [Matplotlib-users] mpl-1.2.1: Speedup code by removing .startswith() calls and some for loops

2013-08-09 Thread Phil Elson
Hi Martin, Thanks for this - we are really interested in speeding up the scatter and barchart plotting with large data sets. In fact, we've done some work ( https://github.com/matplotlib/matplotlib/pull/2156) recently to make the situation better. I'd really like to review these changes (against

Re: [Matplotlib-users] Dynamically change X time format while zooming plot?

2013-07-12 Thread Phil Elson
This surprises me as the AutoDateFormatter automatically kicks in once you pass through some datetime objects, and the AutoDateFormatter & Locator do the right thing when zooming (the format changes depending on the temporal resolution). For example, the following code behaves nicely when I zoom in

Re: [Matplotlib-users] Hovemuller Diagram

2013-07-12 Thread Phil Elson
The balance of time to install vs time to re-implement a feature is only something you can decide, but i suspect it is worth your while getting iris installed (I would say that as an iris developer though). The installation process is only going to get easier over time, for instance last week we ad

Re: [Matplotlib-users] Bug in cbook.exception_to_str() (mpl 1.2)

2013-05-31 Thread Phil Elson
Agreed. I've seen this a couple of times but never reproduced it so elegantly. Would you mind opening up an issue on github - this is definitely a bug (http://matplotlib.org/faq/troubleshooting_faq.html). Thanks! P.S. Welcome to the mailinglist :-) On 31 May 2013 16:02, Skip Montanaro wrote:

Re: [Matplotlib-users] Affine2D on scatter

2013-04-05 Thread Phil Elson
Thanks Derek & John. Very strange. Here's my setup: >>> import matplotlib >>> matplotlib.__version__ '1.2.0' >>> matplotlib.get_backend() 'TkAgg' Would you mind providing all of the relevant details suggested in http://matplotlib.org/faq/troubleshooting_faq.html#troubleshooting, along with the

Re: [Matplotlib-users] MonthLocator doesn't honour rrule bymonthday -1 value for last day of month

2013-04-04 Thread Phil Elson
Hi Mark, Thanks for persevering :-) What is it you want to achieve? Is it that you just want the last day of each month as the located value? Changing your locator to: ax.xaxis.set_major_locator(MonthLocator(bymonthday = -1)) Seems to do the trick for me (I've never looked at the mpl date magi

Re: [Matplotlib-users] Affine2D on scatter

2013-04-04 Thread Phil Elson
Hi Derek, What are we looking at here? The following code: import matplotlib.pyplot as plt import matplotlib.transforms as mtrans import numpy as np plt.figure() ax = plt.subplot(111) base_trans = ax.transData mtx = np.array([[1,1,0], [0,1,0], [0,0,1]]) tr = mtra

Re: [Matplotlib-users] Problem with importing LaTeX package amsmath and $\text{}$

2013-03-30 Thread Phil Elson
Doesn't look like you're using math.usetex & therefore are not actually using latex, but mpl's stripped down tex implementation. Try setting usetex to True, or alternatively I think you could use \mathrm instead of \text to get non mathematical text. HTH On 30 March 2013 11:43, Pawel Chojnacki

Re: [Matplotlib-users] Feedback on an implementation of a matlab-ish "datacursor"

2013-03-13 Thread Phil Elson
Thanks for this Joe, mpldatacursor looks like an excellent piece of work - I for one will be installing and using it regularly. Thanks for sharing! On 13 March 2013 03:58, Joe Kington wrote: > I recently got around to polishing up a snippet I've been using for quite > awhile. https://githu

Re: [Matplotlib-users] matplotlib multiple windows comparison

2013-03-12 Thread Phil Elson
-mail:sjo.in...@gmail.com;sudheer.jos...@yahoo.com > Web- http://oppamthadathil.tripod.com > *** > -- > *From:* Phil Elson > *To:* Sudheer Joseph > *Cc:* "matplotlib-users@lists.sourceforge.net&q

Re: [Matplotlib-users] Plotting with WxAgg backend hangs

2013-03-12 Thread Phil Elson
I don't know of any reason why one shouldn't be able to use the wxAgg backend interactively. This looks like a bug to me. Would you mind adding this as an issue on the github issue tracker? Thanks, On 11 March 2013 19:06, Brendan Barnwell wrote: > I'm 64-bit Windows 7 with matplotlib 1

Re: [Matplotlib-users] basemap and imshow at high latitudes

2013-03-12 Thread Phil Elson
Hi Mike, Do you have any code or an image to show the problem? Cheers, On 11 March 2013 20:44, Hearne, Mike wrote: > I have an issue with basemap.imshow() at higher latitudes - namely the > image (high-res topography, in this case) becomes distorted with > respect to the coastlines the higher

Re: [Matplotlib-users] matplotlib multiple windows comparison

2013-03-12 Thread Phil Elson
Hi Sudheer, Try the interactive mode ( http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.ion): >>> import matplotlib.pyplot as plt >>> plt.ion() >>> plt.plot(range(10)) [] **a figure pops up here and hands you back the python command line** >>> Regards, On 12 March 2013 00:04, S

Re: [Matplotlib-users] why does transform=None cause a patch not to be shown?

2013-03-07 Thread Phil Elson
The key thing to know about normal Artists is that they can have *just one*transform (to take an artist's coordinates into pixel space), so whilst there is no error when you do it, it is not possible to add the same artist to multiple Axes and have the desired effect. To answer your question, try

Re: [Matplotlib-users] View datetime corresponding to x coordinate of cursor

2013-03-05 Thread Phil Elson
Sounds like a nice feature if it doesn't already exist. At first glance, I'd say this was a good candidate for the "low-hanging fruit" label ( https://github.com/matplotlib/matplotlib/issues?labels=low+hanging+fruit&page=1&state=open) for which we have tickets which have a low matplotlib contributi

Re: [Matplotlib-users] depth longitude plot

2013-03-02 Thread Phil Elson
nline images 1] Hope that helps! Phil On 2 March 2013 09:37, Phil Elson wrote: > Perhaps something like: > > > from matplotlib import pyplot as plt > > from netCDF4 import Dataset > > import numpy as np > > > > url=*' > http://www.marine.csi

Re: [Matplotlib-users] depth longitude plot

2013-03-02 Thread Phil Elson
Perhaps something like: from matplotlib import pyplot as plt from netCDF4 import Dataset import numpy as np url=*' http://www.marine.csiro.au/dods/nph-dods/dods-data/climatology-netcdf/levitus_monthly_temp_98.nc '* ds = Dataset(url) temp = ds.variables[*'TEMP'*] lats = ds.variables[*'**

Re: [Matplotlib-users] changing the shade of a color depending on a value

2013-02-27 Thread Phil Elson
Joe Kington's answer is the best solution I've seen to this problem: http://stackoverflow.com/questions/13622909/matplotlib-how-to-colorize-a-large-number-of-line-segments-as-independent-gradi There is also an example in the gallery: http://matplotlib.org/examples/pylab_examples/multicolored_lin

Re: [Matplotlib-users] Undocumented transform API change between 1.1 and 1.2?

2012-12-10 Thread Phil Elson
Hi Joe, Thanks for bringing this up, it is certainly valuable to highlight this on the mailinglist. As you say, the change is hard to spot and, I agree, makes library code supporting v1.1.1 and v1.2 harder than one would like. Typically, anything which is going to break core APIs (even slightly) s

Re: [Matplotlib-users] cross hatching in contours?

2012-12-05 Thread Phil Elson
As of matplotlib v1.2.0 you can hatch a contour set directly. There is an example in the gallery: http://matplotlib.org/examples/pylab_examples/contourf_hatching.html Hope that helps, Phil On 5 December 2012 17:28, spencerahill wrote: > Jae-Joon Lee wrote > > On Thu, Sep 15, 2011 at 10:33 PM

Re: [Matplotlib-users] mailing list archive broken ?

2012-11-28 Thread Phil Elson
Hi Pierre, Thanks for raising this (sorry we haven't got back to you sooner). The mailing list isn't dead, but the archiving link certainly makes it look like it is. I've just submitted a pull request ( https://github.com/matplotlib/matplotlib/pull/1540) to get the mpl docs to link to the nabble

Re: [Matplotlib-users] aspect ratio bug ?

2012-11-20 Thread Phil Elson
The original question was raised in a mpl ticket: https://github.com/matplotlib/matplotlib/issues/1513 My original answer there (copied & pasted): The bbox_inches='tight' option to savefig does some analysis on the artists visible on your plot and figures out the minimum bounding box needed to fi

Re: [Matplotlib-users] Plotting a circle while also changing the limits of the axes

2012-11-05 Thread Phil Elson
Hi Brad, I didn't quite follow what it was that you were trying to achieve, but the following example may be of interest to you: import matplotlib.pyplot as plt from matplotlib.patches import Ellipse, Circle import matplotlib.transforms as mtrans fig = plt.figure() ax1 = fig.add_subplot(111

Re: [Matplotlib-users] Type 1 fonts with log graphs

2012-10-30 Thread Phil Elson
Hi Brandon, I notice that this is cross-posted on StackOverflow ( http://stackoverflow.com/questions/13132194/type-1-fonts-with-log-graphs). Personally, I have no problem with cross posting, but to save two people having to answer the same question, I would make sure it was explicit that this had

Re: [Matplotlib-users] Reading a remote JPG URL using imread

2012-10-19 Thread Phil Elson
Good idea. If the png version works then the jpg version should also be made to work, Would you be willing to open up an issue for the feature request? : https://github.com/matplotlib/matplotlib/issues/new If your ready and willing to implement such a thing, that would be even better (just open a

Re: [Matplotlib-users] mpl command-line utilities

2012-10-18 Thread Phil Elson
I can certainly see the benefit. As Mike said, I don't think I would use it myself, but I could see non-python users finding it useful. Personally, I think this would be a nice extension that doesn't have to live in the core matplotlib code base. That way release cycles and testing can be done com

Re: [Matplotlib-users] Normalize and special scalar handling

2012-10-18 Thread Phil Elson
> If nothing speaks against it, i could do a pull request. If you are willing, I would encourage you to do that, or at least make a branch in your matplotlib fork and post the diff URL here. That way we can discuss the pros & cons in-line, even if it means that we do no actually merge the PR (that

Re: [Matplotlib-users] plot() question

2012-10-16 Thread Phil Elson
To plot a line using pyplot.plot you need an array/list of x coordinates and an array/list of y coordinates. So if you have: data = [[64, 13], [66, 22], [68, 9], [70, 11], [72, 8], [74, 10], [76, 11], [78, 8], [80, 9], [82, 9], [84, 15], [86, 13], [88, 5], [90, 9], [92, 13],

Re: [Matplotlib-users] XKCD style graphs?

2012-10-04 Thread Phil Elson
Nice challenge Fernando! Damon, I love the solution! I do wonder whether we could do some quirky transform on the lines to achieve a similar result, rather than manipulating the data before plotting it. The benefit is that everything should then get randomly Xkcd-ed automatically - maybe I will sa

Re: [Matplotlib-users] Bug when zooming on multiple lines separated by None

2012-10-03 Thread Phil Elson
np.array([0, 1]) > plt.plot(x0, y0) > plt.plot(x1, y1) > # Add this > plt.xlim([0., 0.2]) > plt.ylim([.9, 1.1]) > plt.show() > > I get a 45° line. > > Ludovic > > ps: I use matplotlib 1.1.1rc (stock version available on repositories) on > Xubuntu 12.04

Re: [Matplotlib-users] Bug when zooming on multiple lines separated by None

2012-10-03 Thread Phil Elson
This works for me with 1.2 (not tested before that): import matplotlib.pyplot as plt import numpy as np x = np.array([0, 1, None, 1, 0]) y = np.array([0, 1, None, 0, 1]) plt.plot(x, y) plt.show() I get two distinct lines crossing each other at (0.5, 0.5) HTH, ---

Re: [Matplotlib-users] Create a figure window without navigation toolbar

2012-10-03 Thread Phil Elson
Personally, I am not a fan of adding a window specific keyword to the figure function (although there may be some there already). With 1.2 you can use Matthew Emmett/Paul Ivanov's awesome new context manager to remove the toolbar for the duration of the with statement: import matplotlib.pyplot as

Re: [Matplotlib-users] How to modify the navigation toolbar easily in a matplotlib figure window?

2012-10-03 Thread Phil Elson
> Note, however, code has been improved for the 1.2.0 release to make it easier to modify the set of buttons that are used. In backend_bases.py, look for the NavigationToolbar2 class. Ah yes! I knew I did that for a good reason. :-) Good thinking Ben! -

Re: [Matplotlib-users] Problem with axvline in gridspec with log Y axis

2012-09-17 Thread Phil Elson
the best, Phil On 14 September 2012 17:53, Scott Lasley wrote: > > On Sep 14, 2012, at 5:02 AM, Phil Elson wrote: > > > Thanks for raising this. I have simplified and opened an issue for the > bug (https://github.com/matplotlib/matplotlib/issues/1246) and will be > lookin

Re: [Matplotlib-users] Problem with axvline in gridspec with log Y axis

2012-09-14 Thread Phil Elson
Thanks for raising this. I have simplified and opened an issue for the bug ( https://github.com/matplotlib/matplotlib/issues/1246) and will be looking at this asap. All the best, Phil -- Got visibility? Most devs has no i

Re: [Matplotlib-users] numpoints in legend() function for scatter plot is not working in matplotlib 1.1.0?

2012-09-10 Thread Phil Elson
Ben, on master scatter legends are broken. A pull request (I can't remember which, and github is down, possibly #1176) fixes this (obviously, the PR is marked as release critical for 1.2). I have confirmed, that even once fixed on master, the scatter legend handler does not take notice of the "num

Re: [Matplotlib-users] Rectangle Bug

2012-09-07 Thread Phil Elson
This seems to a be common misconception... I guess in future, we could add a check to the add_patch method to see if the given artist already has an associated Axes, and if it does, emit a warning. On 7 September 2012 07:42, Eric Firing wrote: > On 2012/09/06 8:35 PM, jonasr wrote: > > That s

Re: [Matplotlib-users] axis default formatting with strange scientific-like notation

2012-08-19 Thread Phil Elson
I'm not aware of an rc param for this. The relevant github issue: https://github.com/matplotlib/matplotlib/issues/461 Regards, Phil On 19 August 2012 21:27, Christopher Graves wrote: > Using matplotlib 1.1.1. > If one runs the following code: > > from pylab import * > > plot([19.185,19.187],[

Re: [Matplotlib-users] Adding a ready figure to pyplot.

2012-07-29 Thread Phil Elson
I don't have a good answer to this and have had to implement such a thing in an outstanding pull request (in my case, I have a figure which has been un-pickled and needs re-attaching to pyplot). My proposed mechanism goes something like: figure = matplotlib.figure.Figure(...) import matplotlib.

Re: [Matplotlib-users] axvspan with dates on x-axis

2012-07-26 Thread Phil Elson
ge the months to short English form" you mean in the > data file? > That is, Abr -> Apr, Mai -> May??? ...still did not work. > > > From: Phil Elson > To: Luciano Fleischfresser > Cc: "Matplotlib-users@lists.sourceforge.net" &

Re: [Matplotlib-users] axvspan with dates on x-axis

2012-07-23 Thread Phil Elson
Looks like your very close. I needed to change the months to short English form, change the line ax3.grid('True') to ax3.grid(True) and add the line ax3.axvspan(*mdates.datestr2num(['05/18/2012', '06/30/2012']), facecolor='g', alpha=0.5) To get the box on the lower plot. Hope that help

Re: [Matplotlib-users] How to Change Axis Tick Mark Labels

2012-07-23 Thread Phil Elson
Ah, sorry, forgot to reply to all. Please see the solution I provided to Jon. -- Forwarded message -- Date: 22 July 2012 15:08 Subject: Re: [Matplotlib-users] How to Change Axis Tick Mark Labels Sounds like you want to use a FunctionFormatter rather than modifying the ticks thems

Re: [Matplotlib-users] gallery link broken/not working

2012-07-19 Thread Phil Elson
I can confirm the bad link. Would you mind opening a new issue on github for this? github.com/matplotlib/matplotlib/issues/new Thanks, On 19 July 2012 10:15, Francesco Montesano wrote: > Hi, > > roaming through the gallery I've found that in > http://matplotlib.sourceforge.net/examples/pylab_ex

Re: [Matplotlib-users] path contains_point IndexError: Unexpected SeqBase length

2012-06-11 Thread Phil Elson
I can't reproduce this on version >= 1.1.0. What version of matplotlib are you using? On 11 June 2012 17:23, Gustavo Goretkin wrote: > The problem is that the function in _path.cpp expects a path radius > argument, r. > > Here is the signature: > point_in_path(double x, double y, double r, PathI