SourceForge logo
SourceForge logo
Menu

[matplotlib-devel] Re: help...

From: Fernando P. <Fer...@co...> - 2005年02月23日 22:59:45
John Hunter wrote:
>>>>>>"Paul" == Paul Barrett <ba...@st...> writes:
> 
> 
> This is the continuation of an exchange in which Fernando reported a
> problem when viewing eps figures generated by mpl and included in a
> pdf file generated by latex.
Thanks John, I really appreciate you working on this right now. Unfortunately 
I'm scrambling to finish this talk, so I don't have time to switch matplotlib 
versions right now across my desktop _and_ laptop. Don't switch horses while 
crossing the river and all that.
But next week I'll look into the fix. For now, switching to pngs works OK, 
they look fine (if not perfect) under Acroread, which is all I need. As a 
side note, even if these print fine, since I use acroread for a laptop-based 
presentation via a projector, that doesn't do me much good :)
Anyway, thanks again to John and Paul for tackling this at my request. I'll 
survive with the png solution for now, and will look into the new PS option 
next week.
While on that topic: would it be possible/sensible to support at least 
sub/superscripts and symbols in the plain PS backends? Gnuplot allows you to 
switch fonts and embed symbols with the native PS symbol font, which has the 
advantage of producing tiny PS files. Here's an example of some old code of mine:
 tit_s = "N_{nod}=%s, {/Symbol e}=%1.1e, N_{blocks}=%s"
 title = tit_s % (self.nnod,self.cutoff,self.nkeys())
Not perfect, and eps-specific, but quite handy for making small EPS files with 
basic mathematical notation.
I suggest this because right now, as far as I'm concerned, the mathtext 
support is in practice of little use. Since the _whole_ string has to be $-$ 
bracketed, putting text with a bit of math doesn't work well. Most real-world 
usage of symbols in plot labels is of this kind, rather than one big equation. 
 I know about using \textrm for text, but the resulting spacing is so ugly 
that it's really not worth using.
Another option would be to get support for mathtext in substrings (e.g. 
r'Error for $\epsilon=1$' as a valid label). But I know that's hard. If you 
go down this road, for ease of parsing, you may want to require the 
beginning/end math markers to be \( \), as latex allows (but doesn't enforce).
Anyway, I'm really grateful and don't want to sound like a whiner. With time, 
I'm sure we'll be able to work out all the remaining kinks of proper labeling 
for scientific plots with math in them in an optimal manner. And again, 
thanks for all the hard work so far.
Best,
f

View entire thread

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /