[Matplotlib-users] Creating custom markers as the union of complex vertices

2017-07-12 Thread Eric Emsellem
Hi I have been looking for an elegant/simple (working!) solution to create new complex markers for matplotlib. For example, I would like to design a new marker which is the union of a set of vertices, for example (just an example), two petals which are symmetric (see verts1 and verts2) and t

[Matplotlib-users] four colour theorem

2012-01-27 Thread Eric Emsellem
Dear all, I have a set of Voronoi bins, defined by nodes (x,y) and an underlying mesh of squared bins. See an example here of such Voronoi bins. http://www.google.fr/imgres?q=voronoi+binning&hl=fr&sa=X&biw=1280&bih=665&tbm=isch&prmd=imvnsb&tbnid=zp0RRIktKlF9pM:&imgrefurl=http://www.aanda.org/art

Re: [Matplotlib-users] Unknown projection '3d' even with svn version?

2010-11-18 Thread Eric Emsellem
Ok problem(s) solved, thanks a lot for the efficient help (this also taught me how to go through the code more thoroughly) * for the record: I had a pylab.py in the site-packages directory, probably a left-over from some other installation, which was interfering with the pylab.py which should b

Re: [Matplotlib-users] Unknown projection '3d' even with svn version?

2010-11-17 Thread Eric Emsellem
Dear Ben thanks a lot for this thoughful answer. When I use only "ipython" and not "ipython -pylab" IT WORKS!!! So this is a problem with "ipython -pylab" call... Any thought of why this is? I provide more info below thanks for any help there. Eric P.S.: Here is the output of my setup: In [

Re: [Matplotlib-users] Unknown projection '3d' even with svn version?

2010-11-17 Thread Eric Emsellem
yes, it looks like this is the right file (when I look at matplotlib.__file__) Now tracing which routines are run when doing this, it looks like it looks for projection in projections/__init__.py after going through line 675 of figure.py It looks like add_subplot of plt.figure() is not compatible

Re: [Matplotlib-users] Unknown projection '3d' even with svn version?

2010-11-16 Thread Eric Emsellem
Dear Ben thanks a lot for the quick reply. I did that (and read some posts on the web) but no luck, as it says: 1.0.0 I in fact just went back to my openSuse 11.3 (Science repo) version because it went really wrong with scipy etc and I didn't want to mess up my setup. But still the same messa

[Matplotlib-users] Unknown projection '3d' even with svn version?

2010-11-16 Thread Eric Emsellem
Hi, I have just installed the svn version of matplotlib and basemap + numpy from the svn repository of http://download.opensuse.org/repositories/home:/ocefpaf/openSUSE_11.3/x86_64/ When I do: === ipython -pylab (matplotlib 1.0.0, backend GTKAg

[Matplotlib-users] segmentation fault..

2010-10-01 Thread Eric Emsellem
Hi I just upgraded to opensuse 11.3. And I get now: ipython -pylab: matplotlib version 1.0.0 verbose.level helpful platform is linux2 *Segmentation fault* Any clue? I am using IPython 0.10, Python 2.6.5 Eric -- S

Re: [Matplotlib-users] MPL = Location of new figure on desktop

2010-08-20 Thread Eric Emsellem
Hi thanks a lot for the feedback. Just tested with Qt4Agg and the window is coming up in the right location (just below my xterm where there is still space for a new window) now, and sometimes on TOP, but also sometimes at the BOTTOM I was using WxAgg before. So it seems it is backend depe

[Matplotlib-users] MPL = Location of new figure on desktop

2010-08-20 Thread Eric Emsellem
Hi I have one very nagging issue which I would like to solve with matplotlib once and for all: this may have to do with my desktop windown manager but I couldn't find much there, so any input is welcome. When I open a new figure, the figure ALWAYS comes BELOW my current xterm (using KDE 4.3) a

[Matplotlib-users] version of numpy for matplotlib: wrong test in setupext.py

2010-04-28 Thread Eric Emsellem
Hi I just downloaded numpy 2.0 and there is a test in the setupext.py of matplotlib which says: nn = numpy.__version__.split('.') if not (int(nn[0]) >= 1 and int(nn[1]) >= 1): This clearly does NOT work for numpy 2.0.0 since nn[1] is 0 Please change this. Eric -

[Matplotlib-users] new marker: how to make a spiral

2010-01-30 Thread Eric Emsellem
Hi I am using "verts" in the matplotlib scatter function and managed to create many new symbols for scatter plots. One I cannot make is a spiral-like symbol (logarithmic spiral) because it does connect the first and last point of the verts series of x,y points I am defining. Is there a way to avoi

Re: [Matplotlib-users] matplotlib CRASHes when saving as a postscript file

2010-01-09 Thread Eric Emsellem
Thinking about it: when matplotlib transfer the plot to ghostscript, is there a parameter in the call for "gs" which limits the memory usage??? It seems that this is discussed in some posts about gs Eric On 09/01/10 04:25, Jae-Joon Lee wrote: > I can reproduce this error with the current svn. >

Re: [Matplotlib-users] matplotlib CRASHes when saving as a postscript file

2010-01-09 Thread Eric Emsellem
; ax3.set_rasterization_zorder(0.6) > > This code needs to be inside the for-loop so that all the pcolormesh > plots get rasterized. > Also, note that, in your current script, the third pcolormesh plot is > assigned to "map2", instead of "map3"

[Matplotlib-users] matplotlib CRASHes when saving as a postscript file

2010-01-07 Thread Eric Emsellem
Hi I finally managed to write a simplified version of my python script which crashes when trying to save the figure as a postscript file. (this is related to a previous post). See below. The script is provided, as well as the full error message. Sorry for the long script, but basically I am plott

[Matplotlib-users] Problems generating postscript!

2010-01-02 Thread Eric Emsellem
Hi I am having reccurrent problem generating postscript files using savefig. I am basically generating a figure with lots of small thumbnail images (loaded with mpl pcolormesh and contour) and some overimposed text. When I do: savefig("myfig.eps") it takes quite a while, and makes rather big fi

Re: [Matplotlib-users] Colours of histograms?

2009-12-30 Thread Eric Emsellem
great. Thanks! I had a look at the thumbnails but didn't find the one you point out. (And the doc is confusing) Thanks! and yes, very weird behaviour when the two arrays have the same length... Eric On 30/12/09 19:53, Jae-Joon Lee wrote: > x1 = random(1000) > x2 = random(1000) > > n, bins, pat

Re: [Matplotlib-users] Problem generating postscript

2009-12-30 Thread Eric Emsellem
'm not sure if it is > related. > > http://old.nabble.com/Segmentation-fault-with-EPS-output-on-matplotlib->%3D0.98.5.2-to25257581.html#a25334270 > > So, see if using "xpdf" as a distiller works. >> -- ==

[Matplotlib-users] Colours of histograms?

2009-12-30 Thread Eric Emsellem
Hi how do I specify the colour of the bars in an histogram done with more than one set of data? Example: x1 = random(1000) x2 = random(1000) hist([x1,x2], c=['r','b']) does not work... I have tried with rgba sequences but no luck there. The help of hist << color: matplotlib color arg or sequ

[Matplotlib-users] Problem generating postscript

2009-12-30 Thread Eric Emsellem
Hi again regarding my last post, I still have pb generating simple eps files. Now I turned on "usetex" to True and I get the message given below. If anyone can help me with this, it would be great since I am now stuck with this. Reminder: the pb occurs when I save a figure (savefig) in postscript

Re: [Matplotlib-users] Error when running code on remote machine: how can I overpass this?

2008-12-30 Thread Eric Emsellem
sorry, I just found the simple way out and so I am answering my own post: use Agg instead of GtkAgg... sorry for the dummy question and the inconvenience, and have a nice end of 2008 cheers > I am trying to run a relatively large code, which includes some calls to and > import from pylab/matpl

[Matplotlib-users] Error when running code on remote machine: how can I overpass this?

2008-12-30 Thread Eric Emsellem
Hi, I am trying to run a relatively large code, which includes some calls to and import from pylab/matplotlib, on a remote machine: the part of the code I am running is NOT performing any plot so there is no direct access to a display. Unfortunately it still crashes with something like: ---> 40

Re: [Matplotlib-users] pylab or not... crashes or not

2008-12-02 Thread Eric Emsellem
running the last ipython version now (0.9.1), and it does not help (got stuck the same way). The difference now is that ipython provides a message: Warning: Timeout for mainloop thread exceeded switching to nonthreaded mode (until mainloop wakes up again) It seems that ipython developers did cat

Re: [Matplotlib-users] pylab or not... crashes or not

2008-12-02 Thread Eric Emsellem
:08:00 +0100 >> From: Eric Emsellem <[EMAIL PROTECTED]> >> Subject: [Matplotlib-users] pylab or not... crashes or not >> >> - when I start a session with "ipython -pylab" I often get crashes >> with my >> session. When I mean "often", it me

[Matplotlib-users] pylab or not... crashes or not

2008-12-01 Thread Eric Emsellem
Hi this may be a known problem (didn't find anything on this issue) but here it is: - when I start a session with "ipython -pylab" I often get crashes with my session. When I mean "often", it means really often like once everything 1/2h or so. A crash means that the command I just sent gets stuck

Re: [Matplotlib-users] Plotting issue with mpl = getting stuck

2008-05-13 Thread Eric Emsellem
Hi, thanks for the input. In fact this happens on a dual core machine. As for the Ipython version etc it is written at the end of my original email. I'll try to see with the Ipython forum maybe. Not sure where it comes from, which is the difficult part (mpl, ipython, or...?) I'll also try to iso

[Matplotlib-users] Plotting issue with mpl = getting stuck

2008-05-13 Thread Eric Emsellem
Hi, I am having a recurrent (and very annoying) problem with plotting. Basically: I enter my Ipython session (with -pylab), execute a few commands from locally developed modules, and then try to make one plot. The plot does not appear (I don't get back the command line), and my session is then c

Re: [Matplotlib-users] Installation of, Python/mpl/numpy/scipy/Ipython for

2007-11-24 Thread Eric Emsellem
Hi a quick note abut a "super package": to let people know that now OpenSuse 10.3 has a set of RPMs for all scipy, numpy, mpl, ipython, and others some of these being on the "science" repository, e.g.: http://download.opensuse.org/repositories/science/openSUSE_10.3/x86_64/ for the 64b distrib (ip

[Matplotlib-users] set_extent for contours?

2007-08-27 Thread Eric Emsellem
Hi, is there a plan (or an existing command) to have set_extent working for contours, as was recently done for imshow? I know that "contour" has different inputs since you can specify X,Y, the data coordinates. However, I would like to do something like: ... co = contour(data, extent=(0.,2.,0.,2.

Re: [Matplotlib-users] stuck after a mpl_connect - how to disconnect and go on

2007-08-23 Thread Eric Emsellem
Hi thanks a lot for this feedback! Your example is quite nice indeed. However there is something I may not have fully understand. If I use the example you sketch, I of course need to call the displayer class (right?), by doing something like: test = displayer() However, then I hit the same prob

[Matplotlib-users] stuck after a mpl_connect - how to disconnect and go on

2007-08-22 Thread Eric Emsellem
Hi sorry to post this again but all my attempts to solve the matplotlib problem below failed and I desperately need this to progress. I would like to use mpl_connect and disconnect to examine a series of 2d arrays in turn (with a "for" loop), one after the other: ==> at each iteration I'd like t

[Matplotlib-users] How to pause a program while button is not 3???

2007-08-21 Thread Eric Emsellem
Hi, I have a "simple" problem with mpl, but didn't find a way to solve it so far. Let's say I have a set of three 2Darrays I would like to : - load using imshow - then connect to the mouse click event and add all X and Y coordinates obtained when clicking (so each time I click, I'll get xc += ev

[Matplotlib-users] Gnome problem when plotting with mpl

2007-04-10 Thread Eric Emsellem
Hi, a problem that I have since some time now using mpl: everytime I start plotting, I get something like: (python:6374): GnomePrintCupsPlugin-WARNING **: iconv does not support ppd character encoding: ISOLatin1, trying CSISOLatin1 I know this is not really a mpl problem, but if anybody has a cl

Re: [Matplotlib-users] where is twiny ??

2007-02-13 Thread Eric Emsellem
Thanks a lot for adding it in svn (I indeed did the change myself in my pylab.py). cheers and thanks again for the quick and positive response! Eric John Hunter wrote: > On 2/13/07, Eric Emsellem <[EMAIL PROTECTED]> wrote: > > At the time noone wanted it, but it's easy e

[Matplotlib-users] where is twiny ??

2007-02-13 Thread Eric Emsellem
Hi, I would need the equivalent of twinx, but for other axis, so a "twiny" function. Shouldn't it be in mpl already? thanks for your help, Eric - Using Tomcat but need to do more? Need to support web services, security? Get

[Matplotlib-users] x=, y=, z=??

2007-01-12 Thread Eric Emsellem
Dear all, I am coming back to an issue for which I didn't get a direct answer (except for a very nice module from Angus McMorland!): - at the moment different backends in mpl automatically provides, when an image (or a plot) is displayed with e.g. imshow (plot), the coordinates x and y directly i

Re: [Matplotlib-users] a memory + CPU problem when using mpl_connect?

2006-12-29 Thread Eric Emsellem
** my text does not appear fully (some part is blanked, and changing the bbox does not seem to do much) Eric John Hunter wrote: "Eric" == Eric Emsellem <[EMAIL PROTECTED]> writes:

Re: [Matplotlib-users] a memory + CPU problem when using mpl_connect?

2006-12-29 Thread Eric Emsellem
great! but one question though: I need to put the text with figtext and thus use figure coordinates (instead of pixel coord). So how would I replace the : matplotlib.transforms.lbwh_to_bbox ? thanks Eric John Hunter wrote > def ondraw(event): > l,b,w,h = t.get_window_extent(event.renderer).

[Matplotlib-users] (default) tracing intensity in imshow, figimage etc

2006-12-29 Thread Eric Emsellem
Hi again, thinking about the module I am writing which will include a "move mouse event" to get the intensity of the pixel in an imshow provided in the figure I am wondering: - would it make any sense to DIRECTLY include such a facility (intensity of pixel provided for an imshow, figimage...) NEXT

Re: [Matplotlib-users] a memory + CPU problem when using mpl_connect?

2006-12-29 Thread Eric Emsellem
Hi, thanks for this useful and quick answer. I am (always) using GTKAgg (hope it is a good choice). I understand the 40 Mb part then, but not the 150-200 Mb... (this happens when I move the cursor within the figure window only and things get worse when I reload the data with a new imshow). Two th

[Matplotlib-users] a memory + CPU problem when using mpl_connect?

2006-12-29 Thread Eric Emsellem
Hi, I am writing a small module to easily load images and interact with them. I now face a memory usage +CPU problem, which may in fact be the result of a normal behaviour of matplotlib (but more certainly something I am not doing right), but I really like to be sure here because if confirmed, it

Re: [Matplotlib-users] \n not working in text ?

2006-12-28 Thread Eric Emsellem
machine (linux) with svn, but I don't see anything > about this in CHANGELOG. > > Eric > > Eric Emsellem wrote: >> hi, >> >> I am trying to have text written on 2 lines, but everything is written >> on a single line. Is that normal? >> >&g

[Matplotlib-users] \n not working in text ?

2006-12-28 Thread Eric Emsellem
hi, I am trying to have text written on 2 lines, but everything is written on a single line. Is that normal? here is an example: plot(arange(10)) ylabel('this is vertical \n test') text(0.5,0.5,"this is a test \n but does not work") thanks Eric === Suse 10.1 matplotlib versi

[Matplotlib-users] How to OVERplot on filled region?

2006-12-05 Thread Eric Emsellem
!! Eric -- ==== Eric Emsellem [EMAIL PROTECTED] Centre de Recherche Astrophysique de Lyon 9 av. Charles-Andretel: +33 (0)4 78 86 83 84 69561 Saint-Genis Laval Cedex fax: +33

[Matplotlib-users] Transparency disappears when saving a figure in Postscript

2006-11-06 Thread Eric Emsellem
') ## ==> the symbols overlap but the transparency is gone -- ==== Eric Emsellem [EMAIL PROTECTED] Centre de Recherche Astrophysique de Lyon 9 av. Charles-Andretel: +33 (0)4 78 86 83 84 69561 Sai

[Matplotlib-users] crashes when using savefig for eps files

2006-10-17 Thread Eric Emsellem
ere is the full report generated by ghostscript: \ 1335 \n\n'% dvifile + fh.read()) NameError: global name 'dvifile' is not defined -- Eric Emsellem [EMAIL PROTECTED]

[Matplotlib-users] bug importing numpy with matplotlib.numerix

2006-10-10 Thread Eric Emsellem
Hi, I have a problem when importing numpy from matplotlib.numerix: When I do: import matplotlib import matplotlib.numerix as num # numpy from num import median, std I get: exceptions.ImportError Traceback (most recent call last) ImportErr

[Matplotlib-users] bug in saving figure with dashed lines

2006-08-01 Thread Eric Emsellem
Hi, I just produced a plot with a curve dashed line: when saving it into a png file it works fine. But when saving it in a postscript the dashed line looks solid on most of the plot. This happens if there are too many points in the line: x = arange(0,1.,0.0001) y = sqrt(x) plot(x,y,'k--') ## Png

Re: [Matplotlib-users] viewing rotated pixels possible with mpl?

2006-07-31 Thread Eric Emsellem
sically, I just copied the guts out of the axes.image.AxesImage.make_image code to experiment with adding a rotation from matplotlib.image import AxesImage from pylab import subplot, show, nx ... -- ==== Eric Emsellem

[Matplotlib-users] viewing rotated pixels possible with mpl?

2006-07-30 Thread Eric Emsellem
Hi, this is a question I have posted earlier, but unfortunately I didn't get any answer. if anybody has any hint on how to do this, I would be most graceful!! Thanks in advance! I would like to visualize an image after a rotation: ==> this means to view each squared pixels as "rotated" (seen as a

[Matplotlib-users] how to view "rotated" images/pixels

2006-07-19 Thread Eric Emsellem
Hi, I would like to visualize an image after some rotation: this means that I would like to have to view each squared pixels as "rotated" (hence an inclined square). I have in fact several images which I need to plot on the same figure (with subplot), each of these having different "rotation angle