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

2012-03-08 Thread Benjamin Root
On Wednesday, March 7, 2012, questions anon 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 into matplotlib? Sorry f

[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 place

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

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 straigt

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

2012-03-08 Thread Benjamin Root
On Thursday, March 8, 2012, Benjamin Root 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: >> >> http://dl.wolfgang-

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

[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. Using

[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 -

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 03/08

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 wrote: > Nicolas Rougier, (to Mic, who can't see a histogram and a line > simultaneously

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

2012-03-08 Thread Jouni K . Seppänen
Alejandro Weinstein 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 revision? Your test case doesn

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] 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 > wrote: > > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root > wrote: > > > +1 as well. I just took another look at the Path object

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

2012-03-08 Thread Benjamin Root
On Thu, Mar 8, 2012 at 11:16 AM, Benjamin Root wrote: > > > On Thu, Mar 8, 2012 at 10:47 AM, John Hunter wrote: > >> >> >> On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root wrote: >> >>> >>> +1 as well. I just took another look at the Path object and I see no >>> such function. The lack of this

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 all

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 wrote: > > > On Thu, Mar 8, 2012 at 10:32 AM, Benjamin Root 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

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 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 a bit more to

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 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 > be added to

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 scat

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 wrote: > 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

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

2012-03-08 Thread Benjamin Root
On Thu, Mar 8, 2012 at 10:21 AM, Dharhas Pothina < dharhas.poth...@twdb.texas.gov> wrote: > > + 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

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

2012-03-08 Thread John Hunter
On Thu, Mar 8, 2012 at 10:21 AM, Dharhas Pothina < dharhas.poth...@twdb.texas.gov> wrote: > > + 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

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

[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 using

[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 backg

Re: [Matplotlib-users] histogram and a line

2012-03-08 Thread Jerzy Karczmarczuk
Nicolas Rougier, (to Mic, who can't see a histogram and a line simultaneously): > You need to specify the ylim because your height may be larger than your > histogram and then you cannot see it. I suspect something similar. The height of matplot_hist.png is 0.040. The line goes from 0 to 300. T

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

2012-03-08 Thread Jorge Scandaliaris
Benjamin Root writes: > > 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, or am I miss

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 =