On 02/15/2012 03:10 PM, Alexa Villaume wrote:
> Hi Eric,
>
> Thanks for your help, I'm still really new to python and matplotlib.
> I've got my labels defined but now I'm having another problem with the
> formatting.
>
> I'm doing -
>
> CS1.level=[14.07, 14.27]
>
> plt.clabel(CS1,CS1.level[::2],inl
Hi Eric,
Thanks for your help, I'm still really new to python and matplotlib. I've
got my labels defined but now I'm having another problem with the
formatting.
I'm doing -
CS1.level=[14.07, 14.27]
plt.clabel(CS1,CS1.level[::2],inline=True,fmt='OIII',fontize=14)
Where I get a type error that
On 02/15/2012 10:15 AM, Alexa Villaume wrote:
> Hi Everybody,
>
>
> I'm trying to label the contours of my contour plot following this
> example -
>
> http://matplotlib.sourceforge.net/examples/pylab_examples/contour_label_demo.html
>
>
> My actual code looks like this -
>
>
> import matplotlib
>
>
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
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
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=F