On Friday 23 May 2008 11:30:03 am Friedrich Hagedorn wrote: > On Fri, May 23, 2008 at 10:51:05AM -0400, Darren Dale wrote: > > On Friday 23 May 2008 10:35:14 am Friedrich Hagedorn wrote: > > > Hello, > > > > > > are there plan to implement a new backend for the latex proper use > > > which create the drawing comand in the pgf language? With this kind > > > of graphic creation I could overcome all the (font-) scaleing problems > > > I have when I want to include a mpl graphic in my latex document. > > > > I'm not familiar with pgf, could you provide some more information? > > pgf is a tex-based graphic language similar to ps-tricks but also > for pdftex. There are very nice graphics: > > http://www.ctan.org/get/graphics/pgf/base/doc/generic/pgf/pgfmanual.pdf > > The basic drawing is like this (a cross) > > \begin{tikzpicture} > \draw (-1.5,0) -- (1.5,0); % horizontal line > \draw (0,-1.5) -- (0,1.5); % vertical line > \draw (1,1) node{$y=x^2$}; % text label > \end{tikzpicture} > > There also exsits makro pakages for (more ore less convinent) data plots > but then you dont have the nice python interface. > > > What problems do you have with font scaling, and what additional > > capabilities do you think such an approach would offer? > > I want that fonts in the mpl graphics have the same (or otherwise related) > proerties as the main-font in my latex document.
I understand this desire. John Hunter came up with the idea of the current latex support around the time that I was writing my dissertation. Like you note below, we sometimes have to iterate to get just what we want, but I think that is unavoidable. More below... > So, therefore I have to know all the font properties from my latex > document (\normalfont): type, family, size. > > The next problem is that the standard size of the mpl graphic (8, 6) inches > is too big for my latex document (0.5\linewidth). Therefore I must scale > the mpl graphic (\includegraphics[width=0.5\linewidth]{...}). But with this > scaling the font in the mpl graphic are also scaled and I have no chance > adapeting the two fonts (mpl, latex) without manual iterations. > > Ok, I could adjust the figsize but the last time I did it (long time ago) > there were other misplaced objects in the mpl graphic (I dont remember > exactly, sorry). > > But if I had the whole mpl graphic as pgf commands there would be no > problem with the font stuff, scaleing and line widths. And may be you > could extend the mpl graphic with some tricky (and eye candy) pgf > extensions (ok I am also a beginner with the pgf language but its > realy powerfull). Wouldn't this cause some problems with how the text is layed out on the canvas? The way it works now, a title can be centered over the axes because the extents of the text are known. If you allow the fonts and font sizes to be dictated by the latex document, they will end up being positioned incorrectly. P.S. please be careful that your responses go to the userlist ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users