"Zelakiewicz, Scott (GE, Research)" <[EMAIL PROTECTED]> writes:
> I get one contour line as expected, but instead of printing the contour > level (50) I would like to print a simple string like "Some String." I > tried using the fmt option of clabel, but it requires a way to stuff in > the level value (ie. fmt="Some String %f"). Is it possible to use a > simple string for these labels? I don't know if there is a recommended way, but here is a quick hack: 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')) show() -- Jouni K. Seppänen http://www.iki.fi/jks ------------------------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users