Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Mark Bakker
I would guess:

CS=contour(A,[50,])
CS.clabel(fmt=FormatFaker('I'))  # Labels contour 50 with I
CS=contour(A,[60,])
CS.clabel(fmt=FormatFaker('II'))  # Labels contour 60 with II

Or write a loop if you have many values.

Mark

On Dec 14, 2007 11:44 PM, Michael Hearne <[EMAIL PROTECTED]> wrote:

> I've seen this, but I'm not clever enough to see how to extend that to
> multiple levels - after all, I don't want to label every line with the same
> string...
> --Mike
> On Dec 14, 2007, at 3:20 PM, Mark Bakker wrote:
>
> Michael -
>
> This trick for replacing contour labels with a string was posted a little
> while back (by someone else):*
> *
>
> class FormatFaker(object):
>def __init__(self, str): self.str = str
>def __mod__(self, stuff): return self.str
>
> A=arange(100).reshape(10,10)
> CS=contour(A,[50,])
> CS.clabel(fmt=FormatFaker('Some String'))
>
>
>
> >
> > From: Michael Hearne <[EMAIL PROTECTED] >
> > Subject: [Matplotlib-users] labeling contours with roman numerals
> > To: Matplotlib Users 
> > Message-ID: < [EMAIL PROTECTED]>
> > Content-Type: text/plain; charset="us-ascii"
> >
> > Does a LineCollection generated by contour() have a property that
> > holds the labels?  I would like to label my contour lines with roman
> > numerals, and cannot figure out how to get clabel to do that.
> >
> > Thanks,
> >
> > Mike
> >
> >
> >
>
>
>
>
> --
> Michael Hearne
> [EMAIL PROTECTED]
> (303) 273-8620
> USGS National Earthquake Information Center
> 1711 Illinois St. Golden CO 80401
> Senior Software Engineer
> Synergetics, Inc.
> --
>
>
>
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Michael Hearne
I've seen this, but I'm not clever enough to see how to extend that  
to multiple levels - after all, I don't want to label every line with  
the same string...


--Mike
On Dec 14, 2007, at 3:20 PM, Mark Bakker wrote:


Michael -
This trick for replacing contour labels with a string was posted a  
little while back (by someone else):

class FormatFaker(object):
   def __init__(self, str): self.str = str
   def __mod__(self, stuff): return self.str

A=arange(100).reshape(10,10)
CS=contour(A,[50,])
CS.clabel(fmt=FormatFaker('Some String'))



From: Michael Hearne <[EMAIL PROTECTED] >
Subject: [Matplotlib-users] labeling contours with roman numerals
To: Matplotlib Users 
Message-ID: < [EMAIL PROTECTED]>
Content-Type: text/plain; charset="us-ascii"

Does a LineCollection generated by contour() have a property that
holds the labels?  I would like to label my contour lines with roman
numerals, and cannot figure out how to get clabel to do that.

Thanks,

Mike








--
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
--


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


Re: [Matplotlib-users] labeling contours with roman numerals

2007-12-14 Thread Mark Bakker
Michael -

This trick for replacing contour labels with a string was posted a little
while back (by someone else):*
*

class FormatFaker(object):
   def __init__(self, str): self.str = str
   def __mod__(self, stuff): return self.str

A=arange(100).reshape(10,10)
CS=contour(A,[50,])
CS.clabel(fmt=FormatFaker('Some String'))



>
> From: Michael Hearne <[EMAIL PROTECTED]>
> Subject: [Matplotlib-users] labeling contours with roman numerals
> To: Matplotlib Users 
> Message-ID: <[EMAIL PROTECTED]>
> Content-Type: text/plain; charset="us-ascii"
>
> Does a LineCollection generated by contour() have a property that
> holds the labels?  I would like to label my contour lines with roman
> numerals, and cannot figure out how to get clabel to do that.
>
> Thanks,
>
> Mike
>
>
>
-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users


[Matplotlib-users] labeling contours with roman numerals

2007-12-13 Thread Michael Hearne
Does a LineCollection generated by contour() have a property that  
holds the labels?  I would like to label my contour lines with roman  
numerals, and cannot figure out how to get clabel to do that.


Thanks,

Mike




--
Michael Hearne
[EMAIL PROTECTED]
(303) 273-8620
USGS National Earthquake Information Center
1711 Illinois St. Golden CO 80401
Senior Software Engineer
Synergetics, Inc.
--


-
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users