[Matplotlib-users] imshow without scaling of image

2007-03-09 Thread Uwe Schmitt

Hello,

I would like to display an image using pylab
without automatic scaling to the default size of the plot window.

How can I achieve this ?

Greetings, Uwe

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Displaying several points with different colors

2007-03-09 Thread Matthieu Brucher

Hi,

I'm trying to plot a set of points, each point having a different color.
For the moment, I'm trying to do something like that :

 for indice in range(0, points.shape[0]):
   pl.plot(points[indice, 0], points[indice, 1], 'o', c =
colours[indice,:], hold = True)

where points is a numpy array of point and colours is a numpy array of
dimension (points.shape[0], 3)

With Matlab, something like this would function, but not in matplotlib, it
tells me :
ValueError: need more than 0 values to unpack

I am missing something ?

Matthieu
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [mailinglist] Re: Nonlinear colormap ?

2007-03-09 Thread Uwe Schmitt
Ken McIvor wrote:
> Uwe,
>
> I don't know the answer to your question, but yesterday Rob Hetland 
> sent out and email entitled "Creating a non-linear colormap." that 
> includes example code.  That might help you get started.
>
> Ken
>
Thanks, but I can not access this article from the mailing lists archive.
On sourceforge the newest posting is from 23th feb.

Greetings, Uwe

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Drawing in the plot area.

2007-03-09 Thread Zack 24
Hi, All

Is it possible to draw any graphical primitives in the plot area using
its scale?

Let say, I want to plot a filled circle there. Where do I have to look on?

Thanks in advance,

Alexey

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [mailinglist] Re: Nonlinear colormap ?

2007-03-09 Thread Ken McIvor
On Mar 9, 2007, at 5:11 AM, Uwe Schmitt wrote:
>
> Thanks, but I can not access this article from the mailing lists  
> archive.
> On sourceforge the newest posting is from 23th feb.

I'm not sure what the problem with SourceForge is.  I'll forward you  
that email off-list.

Ken


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Displaying several points with different colors

2007-03-09 Thread John Hunter
On 3/9/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm trying to plot a set of points, each point having a different color.
> For the moment, I'm trying to do something like that :
>
>   for indice in range(0, points.shape[0]):
> pl.plot(points[indice, 0], points[indice, 1], 'o', c =
> colours[indice,:], hold = True)
>
> where points is a numpy array of point and colours is a numpy array of
> dimension (points.shape[0], 3)
>
> With Matlab, something like this would function, but not in matplotlib, it
> tells me :
> ValueError: need more than 0 values to unpack

Complete examples always help ince we have no way of knowing what the
points data structures look like, but I'll hazard a gues.  The x and y
arguments to "plot" need to be sequences.  Ie, something like

  plot([0.5], [0.5], 'ro')

It can be inefficient to plot many separate points this way -- if you
have a lot of points, use a
matplotlib.collections.RegularPolyCollection or scatter.

JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] imshow without scaling of image

2007-03-09 Thread John Hunter
On 3/9/07, Uwe Schmitt <[EMAIL PROTECTED]> wrote:

> I would like to display an image using pylab
> without automatic scaling to the default size of the plot window.
>
> How can I achieve this ?

If you want displayed image to just be a pixel dump of the actual
image use figimage

http://matplotlib.sf.net/examples/figimage_demo.py

JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Hold-related strangeness, looks like a bug.

2007-03-09 Thread John Hunter
On 3/9/07, Fernando Perez <[EMAIL PROTECTED]> wrote:

> (or matlab for that matter) in my life, I was rather surprised by the
> behavior and (mis)understood it as a bug.
>
> I've always gotten by just fine in pylab without even knowing what
> hold did, and simply clearing the figure by hand when needed or just
> making a new one.


Just to add a few data points -- the default "hold" state can be set
in your rc file.  It is a property of the current figure and the
current axes.  In you example, when you set fold before creating the
third figure, the setting applued to the current figure (figure 2) but
not the next figure.

JDH

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Displaying several points with different colors

2007-03-09 Thread Matthieu Brucher


Complete examples always help ince we have no way of knowing what the
points data structures look like, but I'll hazard a gues.  The x and y
arguments to "plot" need to be sequences.  Ie, something like

  plot([0.5], [0.5], 'ro')

It can be inefficient to plot many separate points this way -- if you
have a lot of points, use a
matplotlib.collections.RegularPolyCollection or scatter.



Thank you for your answer :)

OK, I'll try to wrap them :|. The best solution would indeed be to paint
them all at once, but I didn't manage to do that, even when I looked in the
scatter_demo2 example :(
What I have is a set of points in a numpy.array - for instance size (2000,
2) -. What I have as well is a nump.array of size (2000, 3). How can I make
plot understand that each line of the set points must be painted with the
corresponding line in the colour array ?

Matthieu
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Displaying several points with different colors

2007-03-09 Thread John Hunter
On 3/9/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote:

> What I have is a set of points in a numpy.array - for instance size (2000,
> 2) -. What I have as well is a nump.array of size (2000, 3). How can I make
> plot understand that each line of the set points must be painted with the
> corresponding line in the colour array ?

You'll probably want to use a regular poly collection, as in the
example below.  Your array of facecolors can pretty much be whatever
you want:

from pylab import figure, nx, show, cm
from matplotlib.collections import RegularPolyCollection


fig = figure()
ax = fig.add_subplot(111)

offsets = nx.mlab.rand(20,2)
facecolors = [cm.jet(x) for x in nx.mlab.rand(20)]
black = (0,0,0,1)

collection = RegularPolyCollection(
fig.dpi,
numsides=5, # a pentagon
rotation=0,
sizes=(50,),
facecolors = facecolors,
edgecolors = (black,),
linewidths = (1,),
offsets = offsets,
transOffset = ax.transData,
)

ax.add_collection(collection)

show()







> Matthieu
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Displaying several points with different colors

2007-03-09 Thread Matthieu Brucher

Thank you, I think thatthis will solve my problem :)
I didn't know this class existed.

Matthieu

2007/3/9, John Hunter <[EMAIL PROTECTED]>:


On 3/9/07, Matthieu Brucher <[EMAIL PROTECTED]> wrote:

> What I have is a set of points in a numpy.array - for instance size
(2000,
> 2) -. What I have as well is a nump.array of size (2000, 3). How can I
make
> plot understand that each line of the set points must be painted with
the
> corresponding line in the colour array ?

You'll probably want to use a regular poly collection, as in the
example below.  Your array of facecolors can pretty much be whatever
you want:

from pylab import figure, nx, show, cm
from matplotlib.collections import RegularPolyCollection


fig = figure()
ax = fig.add_subplot(111)

offsets = nx.mlab.rand(20,2)
facecolors = [cm.jet(x) for x in nx.mlab.rand(20)]
black = (0,0,0,1)

collection = RegularPolyCollection(
fig.dpi,
numsides=5, # a pentagon
rotation=0,
sizes=(50,),
facecolors = facecolors,
edgecolors = (black,),
linewidths = (1,),
offsets = offsets,
transOffset = ax.transData,
)

ax.add_collection(collection)

show()







> Matthieu
>
>
-
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
your
> opinions on IT & business topics through brief surveys-and earn cash
>
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [mailinglist] Re: Nonlinear colormap ?

2007-03-09 Thread Suresh Pillai
I discovered the same problem, so I went looking and found the mailing 
list properly archived at nabble.com:

http://www.nabble.com/Creating-a-non-linear-colormap.-t3362841.html

Cheers,
Suresh

On Fri, 9 Mar 2007, Ken McIvor wrote:

> On Mar 9, 2007, at 5:11 AM, Uwe Schmitt wrote:
>>
>> Thanks, but I can not access this article from the mailing lists
>> archive.
>> On sourceforge the newest posting is from 23th feb.
>
> I'm not sure what the problem with SourceForge is.  I'll forward you
> that email off-list.
>
> Ken
>
>
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] job opportunity at Space Telescope Science Institute

2007-03-09 Thread Perry Greenfield
We are looking for someone to fill a position at the Space Telescope  
Science Institute (in Baltimore, MD) to work on Python tools for  
astronomical data processing and analysis. Details can be found at:

http://www.stsci.edu/institute/brc/hr/co/external/Req559.html

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in aspect ratio for matshow() when using colorbar()

2007-03-09 Thread Suresh Pillai
I guess I didn't read the following carefully:

"... The aspect ratio of the figure window is that of the array
  ... Because of how matshow() tries to
   set the figure aspect ratio to be the one of the array, ..."

which would explain the behaviour below.

Why the restrictions?  Seems one would want to put colorbars, etc in the 
same figure and so why not behave like imshow() which it calls to make the 
output.  And why the new figure (so no possibility of subplots or 
overlays)?  Just curious ... I guess I will use imshow() directly and 
modify the axes as suggested before to get the output looking like 
matshow()

Cheers,
Suresh

On Thu, 8 Mar 2007, Suresh Pillai wrote:

> If one inserts a colorbar after using matshow, then the matrix plot's aspect 
> ratio is incorrect altered.  Here are 2 cases to compare
>
> import pylab
> matrix = pylab.rand(30,30)
>
> 1) matshow() before colorbar()
>
> pylab.matshow(matrix)
> pylab.colorbar()
> pylab.show()
>
> The matrix plot is squished in the x-direction while not in the y thus losing 
> its proper aspect ratio (equal by default).
>
> 2) imshow() before colorbar()
>
> pylab.imshow(matrix)
> pylab.colorbar()
> pylab.show()
>
> Everthing is okay in this case.
>
>
> Thanks,
> Suresh
>
>

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] Square/Circle markers with transparent faces?

2007-03-09 Thread John T Whelan
Dear matplotlib gurus,

When I use

plot(t,x,'rx',t,y,'bs');

in matlab, it produces blue boxes for y, i.e., squares with a blue
border and a transparent interior, so that if one of them lies on top
of a red x, I can see the red x inside the blue box.  The same
construction in matplotlib produces blue squares: squares with a black
border and a blue interior.  I can change the color of the interior
with the markerfacecolor or mfc argument, e.g.,

plot(t,x,'rx');
plot(t,y,'bs',mec='b',mfc='w');

but that produces an opaque white interior which renders invisible any
red x it covers up.

I can change the transparency of a line with the alpha argument, but
there seems to be no corresponding markerfacealpha.

Is there a way in matplotlib to get a square marker with a blue border
and a transparent interior?

Thanks,
-- 
==
Office: 0.17 (Golm) Dr. John T. Whelan
Phone: +49 331 567 7117 MPI for Gravitational Physics
FAX:   +49 331 567 7298 (Albert-Einstein Institute)
http://www.aei.mpg.de/~whelan/  D-14424 Potsdam
[EMAIL PROTECTED][EMAIL PROTECTED]
==


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Square/Circle markers with transparent faces?

2007-03-09 Thread Andrew Straw
set markerfacecolor (a.k.a. mfc) = 'None' (make sure you include the 
quotes).

-Andrew

John T Whelan wrote:
> Dear matplotlib gurus,
>
> When I use
>
> plot(t,x,'rx',t,y,'bs');
>
> in matlab, it produces blue boxes for y, i.e., squares with a blue
> border and a transparent interior, so that if one of them lies on top
> of a red x, I can see the red x inside the blue box.  The same
> construction in matplotlib produces blue squares: squares with a black
> border and a blue interior.  I can change the color of the interior
> with the markerfacecolor or mfc argument, e.g.,
>
> plot(t,x,'rx');
> plot(t,y,'bs',mec='b',mfc='w');
>
> but that produces an opaque white interior which renders invisible any
> red x it covers up.
>
> I can change the transparency of a line with the alpha argument, but
> there seems to be no corresponding markerfacealpha.
>
> Is there a way in matplotlib to get a square marker with a blue border
> and a transparent interior?
>
>   Thanks,
>   


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] how to delete figtext without removing my axes??

2007-03-09 Thread Jouni K . Seppänen
Jeff Peery <[EMAIL PROTECTED]> writes:

> hello, I have an application I'm working on, and I need to remove
> figtext() without using a figure.clear(). how can I do this? thanks.

When you call figtext, save the return value, and then call
set_visible(False) on it to hide it, or delete it from the figure's
texts list:

ft=fig.figtext(x, y, text)
# ...
ft.set_visible(False); draw()
# or:
fig.texts.remove(ft); draw()

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] [mailinglist] Re: Nonlinear colormap ?

2007-03-09 Thread Jouni K . Seppänen
Suresh Pillai <[EMAIL PROTECTED]> writes:

> I discovered the same problem, so I went looking and found the mailing 
> list properly archived at nabble.com:

Another useful mailing list archive is gmane.org:

http://dir.gmane.org/gmane.comp.python.matplotlib.general
http://dir.gmane.org/gmane.comp.python.matplotlib.devel

-- 
Jouni K. Seppänen
http://www.iki.fi/jks


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Bug in aspect ratio for matshow() when using colorbar()

2007-03-09 Thread Eric Firing
Suresh Pillai wrote:
> I guess I didn't read the following carefully:
> 
> "... The aspect ratio of the figure window is that of the array
>   ... Because of how matshow() tries to
>set the figure aspect ratio to be the one of the array, ..."
> 
> which would explain the behaviour below.
> 
> Why the restrictions?  Seems one would want to put colorbars, etc in the 
> same figure and so why not behave like imshow() which it calls to make the 
> output.  And why the new figure (so no possibility of subplots or 
> overlays)?  Just curious ... I guess I will use imshow() directly and 
> modify the axes as suggested before to get the output looking like 
> matshow()
> 

Suresh,

I think the general answer to your questions is "historical accident". 
Matshow was contributed a long time ago, and has been updated only 
minimally to take into account changes made elsewhere.  There was even a 
suggestion that it might not be needed any more, but I think that it can 
continue to be useful and is worth updating to be an axes method, etc. 
This is on my growing mental list of things to do, and is probably one 
of the easier ones.

Eric


> Cheers,
> Suresh
> 
> On Thu, 8 Mar 2007, Suresh Pillai wrote:
> 
>> If one inserts a colorbar after using matshow, then the matrix plot's aspect 
>> ratio is incorrect altered.  Here are 2 cases to compare
>>
>> import pylab
>> matrix = pylab.rand(30,30)
>>
>> 1) matshow() before colorbar()
>>
>> pylab.matshow(matrix)
>> pylab.colorbar()
>> pylab.show()
>>
>> The matrix plot is squished in the x-direction while not in the y thus 
>> losing 
>> its proper aspect ratio (equal by default).
>>
>> 2) imshow() before colorbar()
>>
>> pylab.imshow(matrix)
>> pylab.colorbar()
>> pylab.show()
>>
>> Everthing is okay in this case.
>>
>>
>> Thanks,
>> Suresh
>>
>>
> 
> -
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> ___
> Matplotlib-users mailing list
> Matplotlib-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] errorbar() makes a LOT of lines

2007-03-09 Thread Jack Sankey
Hello,

When I plot using the errorbar() routine, I get beautiful plots,
complete with error bars.  Then, when I want to perform manipulations
on the data after the fact, I use

lines = axes.get_lines()

to get at the lines

lines[n].get_xdata() and set_xdata()

to edit the data etc...

The problem is when I do errobar() I get not only the data lines, but
also a bunch of small lines for drawing the error bars, and it's very
difficult to sort them all out to get at the data of the plot.

My question is, is there an easy/bulletproof way to tell if a given
line from get_lines() is an error bar or the actual data?

Thanks!
Jack

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] trouble with rcParams

2007-03-09 Thread Jeff Peery
Hello, 

I apologize if this message was already posted, it was bounced back to me.

I am having some confusion about how best to set my plot settings. Should I use 
rcParams, or carry around my own class object holding plot() and scatter() 
settings? I have a wx app and I plot simple x y data. I manually add data 
values and each time I do my app clears then redraw the canvas. I'm using only 
plot() scatter() and axhline() in my app. My problem is that my code is a bit 
messy because I have my own class object that stores all the selected plot 
settings, ie colors, line widths, etc. 

I discovered the rcParams and I thought this would really clean up my code a 
bit. So I could set the rcParams and not have to keep track of my plot() and 
scatter() settings because matplotlib already does. Several problems happened 
when I did this:

1) from what I read, I expected a rcParams value to keep if I closed my app 
then reopened it. But it went back to some default... maybe the matplotlibrc 
file? are these things separate? 

2) when I changed the rcParams for my line style (for example) ALL line styles 
changed not just the lines in plot().

3) I didn't see a rcParams object for the scatter() parameters, markers size, 
style, color, linewidth etc. Is this possible?

Am I using rcParams correctly? I want to take advantage of setting my plot() 
and scatter() settings by using matplotlib instead of having to reset them each 
time I draw(). 

Thanks!

Jeff

 
-
 Get your own web address.
 Have a HUGE year through Yahoo! Small Business.-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users