Re: [Matplotlib-users] trouble with rcParams

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

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

IMHO modifying rcParams is not a good way to use the object-oriented
interface. It can be very useful for interactive plotting using the
(state-machine) pylab interface, but such non-explicit state can make
an object-oriented program difficult to follow. Of course rcParams is
needed for things like selecting fonts.

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

rcParams is initialized from the matplotlibrc file.

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

If you want more detailed control, I think you have to use the keyword
arguments (or set the equivalent properties on the line objects).

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

I think the patch.* parameters affect the markers created by
scatter().

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


[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