SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Freddie W. <fr...@wi...> - 2010年02月26日 10:34:56
Hi all,
While playing around with the TeX support in matplotlib (rc('text', 
usetex=True)) and the PDF backend I noticed an interesting phenomena whereby 
the summation symbol in my plot was rendered at a larger size than regular TeX 
would produce.
Taking the following example as my basis 
http://matplotlib.sourceforge.net/examples/pylab_examples/tex_demo.html I 
created a PDF and compared it, in Evince to a PDF with an equivalent math 
section created by LaTeX.
Overlaying the two PDFs results in the following: 
http://freddie.witherden.org/drop/matplotlibtex.png The bottom is the output 
from matplotlib while the top LaTeX. For some reason the summation symbol is 
larger in matplotlib than in LaTeX.
I have seemingly confirmed this with latex + dvipdfm and pdflatex.
Does anyone know what might be causing this? The document font sizes are the 
same and I tried to match the LaTeX file as closely as possible to the one used 
internally by matplotlib.
Polemically yours, Freddie.
From: Jae-Joon L. <lee...@gm...> - 2010年02月28日 00:51:03
I believe it is not just the size of font but the font itself should match.
Depending on your setting, the tex file generated by matplotlib
include preambles related with font setting. For example, below is
mine.
\documentclass{article}
\usepackage{type1cm}
\renewcommand{\rmdefault}{pnc}
\usepackage{helvet}
\usepackage{courier}
\usepackage{textcomp}
\usepackage{ucs}
\usepackage[utf8x]{inputenc}
And of course, the output is different from the output without these preambles.
So when you say,
On Fri, Feb 26, 2010 at 5:09 AM, Freddie Witherden
<fr...@wi...> wrote:
> Does anyone know what might be causing this? The document font sizes are the
> same and I tried to match the LaTeX file as closely as possible to the one used
> internally by matplotlib.
>
Did you match those font preambles also?
Also, is it just the pdf backend? What about other backend?
Regards,
-JJ
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 によって変換されたページ (->オリジナル) /