From: Michael D. <md...@st...> - 2009-10-26 13:04:04
|
That's a very interesting idea. I actually think that with the recent textpath functionality that Jae-Joon added, we may be able to tie text and markers together without too much pain. Then it can advantage of all the performance optimizations in draw_markers. Each of the marker styles now contains a function that draws a path for the marker and then passes that to draw_marker. We could add one that draws an arbitrary text path, and then passes that along. I propose that Line.set_marker supports a new marker style "$...$" which would render whatever "..." is as math text. Were you offering to try to produce a patch yourself? Either way, it would be great to file an enhancement request in the tracker so this idea doesn't get lost. It's a good one. Mike tcb wrote: > Hi, > > Is there some way to add support for latex symbols as markers? > > I think it would be an extension of the current methods for plotting > markers- since I dont think all the color, edge, line style etc > properties would be relevant (or even possible). However, it would > allow arbitrary symbols (at least whatever latex can do) to be used, > which would be really useful. > > The current marker set is fine for most simple plots- but when there > are a few different symbols it quickly becomes tricky to find a set > which can easily be distinguished from each other. The other problem > is that when preparing a graph for publication, it is occasionally > necessary to be able to refer to or quote the symbols in the caption > or the main text- and latex symbols in the graphs would make this look > a bit better. > > I've had a quick look at how the marker symbols are implemented, and > it is my impression that it would be reasonably hard to implement a > new symbol of choice. On the other hand, since I am already using > latex to produce all the text in the graph, it seems it should be > fairly straightforward (with some careful attention to the > positioning...) to use the same text-drawing code which is used for > the legend, axes labels etc, to put the markers on the plot. > > Is there any interest in this? > > thanks, > > tcb > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-devel mailing list > Mat...@li... > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA |