Re: [Matplotlib-users] color normaliztion for an contourf plot

2006-08-25 Thread Eric Firing
Jordan Dawe wrote:
> So I have a contourf plot and I am resetting the ylims so as to only 
> display a subset of the full contourf plot.  Is there anyway to set norm 
> and the colorbar so they take their colormapping settings using the data 
> currently on display?  By which I mean: the full dataset has a range of 
> 260-320.  The reset axes limits display a region that only has values 
> between 280-310.  I'd like the colormap to extend over this range of 
> values automatically, without having to set vmin=280, vmax=310.  Any way 
> to do that?

Jordan,

I don't think so; and although I have not thought hard about it, my 
impression is that adding this capability would take a lot of work and 
redesign.  I expect that in most cases what you describe would not be 
the desired behavior, so it would have to be a non-default option.

Eric

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] Getting started with bar charts

2006-08-25 Thread Derek Hohls
 Jouni 

Wow!  A guru at work... this solves all my current problems;
your insights and comments are most appreciated!

To return to my first post - matplotlib aims to make simple things
simple - I would argue that the way tickmarks are currently dealt
with is NOT simple & it would be great to see some simplifications
or additions to the interface to deal with the issues raised in this
thread (for example, by aligning their behaviour and properties to 
other, similar, chart properties).

Thanks again,
Derek

>>> Jouni K Seppänen <[EMAIL PROTECTED]> 2006/08/23 08:52 AM >>>
[Again copying to matplotlib-users; maybe the main developers can  
comment on whether these shortcomings in the getp/setp interface  
should be fixed.]

Hi Derek,

> It does seem as those these settings affect the top and bottom of  
> the graph - I was wondering if it was possible to show tickmarks  
> along the bottom edge but not the top edge?

I don't think that's directly supported. Here's a hacky way to do it:

 lines = getp(gca(), 'xticklines')
 toplines = [ l for l in lines if getp(l, 'ydata') == (1,) ]
 setp(toplines, visible=False)

How I came up with this: I knew that I wanted to make some of the  
xticklines invisible, so I looked at the list of line objects for  
clues as to what differs between them. They seem to have xdata and  
ydata properties, and ydata is (0,) for half of the lines and (1,)  
for the other half, so it looks like it is the vertical position in  
axis coordinates. (xdata seems to be in data coordinates.)

> And the other property I do not see on the list is the one that  
> shows whether a tick goes "into" the graph or just "out" - in the  
> prc file, there is a line:
>  xtick.direction  : in # direction: in or out
> but there is no "direction' property?

You're right, there is no obvious property to control this. Here's an  
even hackier way to do this (and one that doesn't look very future- 
proof):

 for l in getp(gca(), 'xticklines'):
 setp(l, 'marker', 5-getp(l, 'marker'))

The line objects have a marker property, which is 2 for some markers  
and 3 for the others... so I guessed that one of them means upwards  
and the other downwards, and checked this guess by flipping the  
xtick.direction parameter and looking again. So subtracting the  
marker from 5 flips the direction.

I wonder how this is done in Matlab?

> label: any string
>
> which shows me that the Yaxis has a label - in this case a
> string - but I do not see how one can set the font properties
> for the Yaxis label as it is not Text object??

I think you cannot do this with setp alone. Use the ylabel command:

 ylabel('foo bar', fontsize=18)

-- 
Jouni



-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net 
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


-- 
This message is subject to the CSIR's copyright, terms and conditions and
e-mail legal notice. Views expressed herein do not necessarily represent the
views of the CSIR.
 
CSIR E-mail Legal Notice
http://mail.csir.co.za/CSIR_eMail_Legal_Notice.html 
 
CSIR Copyright, Terms and Conditions
http://mail.csir.co.za/CSIR_Copyright.html 
 
For electronic copies of the CSIR Copyright, Terms and Conditions and the CSIR
Legal Notice send a blank message with REQUEST LEGAL in the subject line to
[EMAIL PROTECTED]


This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] problem with latest numpy

2006-08-25 Thread Flavio Coelho
hi which is the latest version of numpy supported by matplotlib?I recently updated to numpy 1.0b2 and I cant import pylab anymore.part of the problem is this code of numerix.__init__.py:
elif which[0] == "numpy":    try:    import numpy.oldnumeric as numpy    from numpy.oldnumeric import *    except ImportError:    import numpy    from numpy import *    from _sp_imports import nx, infinity
    from _sp_imports import UInt8, UInt16, UInt32    Matrix = matrixmatrix is no longer present on numpy.oldnumeric, so... it breaksany hints?-- Flávio Codeço Coelho
registered Linux user # 386432---"Laws are like sausages. It's better not to see them being made."Otto von Bismark
-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] problem with latest numpy

2006-08-25 Thread PGM
Hola,
Use the SVN version, it works pretty OK with 1.0b2

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users