On Thu, Aug 02, 2007 at 10:31:04AM -0400, Michael Droettboom wrote: > I don't know if we ever reached consensus on how to specify math text > vs. regular text. I agree with Eric that it's down to two options: > using a new kw argument (probably format="math" to be most future-proof) > or Math('string'). I don't think I have enough "historical perspective" > to really make the call but I do have a concern about the second option > that it may be confusing depending on how "Math" is imported. (It may > have to be pylab.Math in some instances but not in others.) But I don't > have a strong objection. > > Any last objections to going with the new keyword argument?
I'm guessing that this discussion is already closed, but I would still like to propose another option, just like the original: specify the format in the string itself by requiring a leading '$'. For example: text(x, y, r'$\sin(x)$') or for those functions not starting with math: text(x, y, r'$$phase $[0,2\pi)$') This is a variant on Math(r'$\sin(x)$') which is a bit more compact. As has been pointed out elsewhere, whether or not the string contains tex markup is a property of the string, not a property of the function that use the string. Note that the format keyword will be required for all functions which have string inputs, and may cause problems if there are multiple string inputs to the function. legend() in particular may be a problem. - Paul ------------------------------------------------------------------------- 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-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel