Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Nicolas Rougier
You need to specify the ylim because your height may be larger than your histogram and then you cannot see it. Here is a script that reproduce your screenshot (with random data). import numpy as np import matplotlib.pyplot as plt plt.rc('xtick', direction = 'out') plt.rc('ytick', direction

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Jorge Scandaliaris
Benjamin Root ben.root@... writes: snip Essentially, you make a Path object using the vertices, and then use its contains_point() method. Ben Root OK, but given that contains_point works with a *single* point at a time, I have to call it for all my points which is a bit more cumbersome,

[Matplotlib-users] pylab TclError: out of stack space - tkinter?

2012-03-08 Thread spey_skaddet
Hi, first time I'm posting here. I'm fairly new to using pylab, and I recently started using tkinter and the canvas widget, and I think I really messed something up! I'm running a pdsoft version Python 2.6.2 (r262:71600, Sep 24 2009, 11:47:14) on UNIX (AFS system - not by choice)! Some

[Matplotlib-users] Changing a single marker on a line

2012-03-08 Thread federico vaggi
Hi, I have a very simple request - I am drawing a line with n points, using a particle marker - something like: x = np.linspace(1,10,11) ** 2 y = np.linspace(1,10,11) plot(x,y,'ro') Is there any way to change the 7th dot (7, 49) to be a blue star instead of a red circle? I was considering

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Dharhas Pothina
+ one on this issue. One of the big advantages of the nxutils points in poly is that you could pass it a large numpy array of points and get back a mask. We found this to be significantly faster than using looping through the single point in poly algorithms from packages like shapely. Echoing

Re: [Matplotlib-users] Changing a single marker on a line

2012-03-08 Thread Benjamin Root
On Thu, Mar 8, 2012 at 10:18 AM, federico vaggi vaggi.feder...@gmail.comwrote: Hi, I have a very simple request - I am drawing a line with n points, using a particle marker - something like: x = np.linspace(1,10,11) ** 2 y = np.linspace(1,10,11) plot(x,y,'ro') Is there any way to change

Re: [Matplotlib-users] Changing a single marker on a line

2012-03-08 Thread Jerzy Karczmarczuk
federico vaggi: I am drawing a line with n points, using a particle marker - something like: x = np.linspace(1,10,11) ** 2 y = np.linspace(1,10,11) ZZZ=plot(x,y,'ro') Is there any way to change the 7th dot (7, 49) to be a blue star instead of a red circle? I was considering using the

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread John Hunter
On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my existing apps. In order to deprecate nxutils, this functionality needs to

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Ryan May
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com wrote: I prefer option 2 because this is fairly easy and avoids code redundancy.  It would take just a few lines of extra code to do this with the python sequence protocol as inputs and python lists as return values.  It would take

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Benjamin Root
On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu wrote: +1 as well. I just took another look at the Path object and I see no such function. The lack of this function is a problem for me as well in my

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
_path.cpp already has a number of methods that use Numpy arrays (John is mistaken that it doesn't depend on Numpy), so adding another is no problem. It was my understanding that nxutils was an internal usage module and not part of the public API, and therefore could be removed as long as

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Eric Firing
On 03/08/2012 07:16 AM, Benjamin Root wrote: On Thu, Mar 8, 2012 at 10:47 AM, John Hunter jdh2...@gmail.com mailto:jdh2...@gmail.com wrote: On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root ben.r...@ou.edu mailto:ben.r...@ou.edu wrote: +1 as well. I just took another look

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
On 03/08/2012 12:35 PM, Michael Droettboom wrote: It shouldn't be a problem to build a compatibility shim -- I'd much rather do that than have multiple functions Oops -- hit send too soon. I meant to say I'd much rather do that than have multiple functions that do virtually the same thing

Re: [Matplotlib-users] Error when saving as PDF using $\alpha$ and 'text.usetex':True

2012-03-08 Thread Jouni K . Seppänen
Alejandro Weinstein alejandro.weinst...@gmail.com writes: TypeError: unicode argument expected, got 'str' I am using MPL verion 1.2.x (built from commit 396a6446). That reminds me of a problem fixed in commit 680edf7, so could you either try cherry-picking that commit or updating to a later

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Paul Hobson
Jerzy et al, Check out the axvline method (of pyplot or an axes object). You'll only have to specify the x-value, and it'll won't rescale your y-axis. -paul On Thu, Mar 8, 2012 at 4:50 AM, Jerzy Karczmarczuk jerzy.karczmarc...@unicaen.fr wrote: Nicolas Rougier, (to Mic, who can't see a

Re: [Matplotlib-users] Has nxutils been removed from mpl?

2012-03-08 Thread Michael Droettboom
There is a proposed solution to all of this here: https://github.com/matplotlib/matplotlib/pull/746 Please test -- I don't have any nxutils-using code myself, and matplotlib itself has none. We should probably convert some of the nxutils code in the wild into some unit tests. Mike On

[Matplotlib-users] imshow of scalar 2D array using a shared color scale

2012-03-08 Thread Wolfgang Draxinger
Hi, I've got a datasets of a pixel particle detector for a number of independent events. I'd like to show them in a row but have them all use the same value and thus color range. What's the most straigtforward way to do this? Cheers, Wolfgang Draxinger

[Matplotlib-users] Errorbars not drawn correctly in logarithmic scales

2012-03-08 Thread Wolfgang Draxinger
Hi, I've a problem with some errorbars not drawn correctly in (double) logarithmic plots. See this PDF for an example: http://dl.wolfgang-draxinger.net/C6_77MeV_raddamage.pdf The vertical errorbar for the datapoint at x=1e3 are not drawn. Similar also happens for some horizontal errorbars.

Re: [Matplotlib-users] Errorbars not drawn correctly in logarithmic scales

2012-03-08 Thread Benjamin Root
On Thursday, March 8, 2012, Wolfgang Draxinger wdraxinger.maill...@draxit.de wrote: Hi, I've a problem with some errorbars not drawn correctly in (double) logarithmic plots. See this PDF for an example: http://dl.wolfgang-draxinger.net/C6_77MeV_raddamage.pdf The vertical errorbar for the

Re: [Matplotlib-users] Errorbars not drawn correctly in logarithmic scales

2012-03-08 Thread Benjamin Root
On Thursday, March 8, 2012, Benjamin Root ben.r...@ou.edu wrote: On Thursday, March 8, 2012, Wolfgang Draxinger wdraxinger.maill...@draxit.de wrote: Hi, I've a problem with some errorbars not drawn correctly in (double) logarithmic plots. See this PDF for an example:

Re: [Matplotlib-users] imshow of scalar 2D array using a shared color scale

2012-03-08 Thread Benjamin Root
On Thursday, March 8, 2012, Wolfgang Draxinger wdraxinger.maill...@draxit.de wrote: Hi, I've got a datasets of a pixel particle detector for a number of independent events. I'd like to show them in a row but have them all use the same value and thus color range. What's the most

Re: [Matplotlib-users] open ascii grid data and plot

2012-03-08 Thread Paul Hobson
In my GIS experience, rasters don't have prj files. That's something that seems to be pretty specific to ESRI shapefiles. Point is, I don't think that's going to help you. All of the basemap examples use netcdf files. I think your path of least resistance right now is to figure out how to convert

[Matplotlib-users] Centering Text with axes_divider

2012-03-08 Thread Patrick Marsh
Greetings, Let me begin by saying that I've fallen in love with ImageGrid. I love the control it gives me in setting up plots, and I really like the control it offers for setting up a colorbar. Unfortunately, like all relationships, ImageGrid and I have hit a rough patch. I like to manually

Re: [Matplotlib-users] open ascii grid data and plot

2012-03-08 Thread Benjamin Root
On Wednesday, March 7, 2012, questions anon questions.a...@gmail.com wrote: Hi all, I am still having a problem with the same code. I am not sure if maybe the problem is how I read the data in as numpy.genfromtxt Is there a step I need to take to convert the data to numpy array to then read