4

Possible Duplicate:
Tikz changes included graphics

I include my pdf vector plots (created with matplotlib) in nodes belonging to a TikZ matrix for positioning (e.g. see TikZ: Image Matrix - shifting connected paths).

If i include an image (the standard latex way) the output looks identical to the original vector graphic within my pdf viewer. Yet, if i include the image into a TikZ node the output is altered. The linewidths of the vector graphic shrink compared to the original.

See the following screenshot showing the same figure included two different ways. How can i circumvent the odd TikZ alteration? TikZ vector inclusion alters appearance

\documentclass[a4paper]{scrartcl}
\usepackage{tikz}
\begin{document}

\begin{figure}[ht]
\begin{tikzpicture}
  \matrix[column sep=0.0mm,row sep=0.0mm,inner sep=0cm,ampersand replacement=\&]%
  {%
    \node(img1){\includegraphics{prof.pdf}}; \&
    \node(img2){}; \\
};
\end{tikzpicture}
\caption{Tikz inclusion}
\end{figure}
\begin{figure}[ht]
\includegraphics{prof.pdf}
\caption{Standard Inclusion}
\end{figure}

\end{document}

Image Links (pdf)

bioslime
  • 1,153
  • Which PDF viewer do you use? Acrobat is known for doing such things on the screen due to alpha-channel. Have you tried to print them or open in another program? – yo' Jan 13 '13 at 21:26
  • I use Preview/Skim on a Mac. And even in the print the two figures look different. – bioslime Jan 13 '13 at 21:30
  • 2
    The line width settings leak into the pdf inclusion mechanism. Add line width=1.0pt option to the first node. – percusse Jan 13 '13 at 22:03
  • 1
    Your included pdf should use the default line width of PDF (1.0pt). TikZ changes this to 0.4pt. – Paul Gaborit Jan 13 '13 at 22:11
  • That does it; This makes me wonder, are there similar easy to set settings that allow me to alter a plot after creation (fontsize, font ...)? – bioslime Jan 13 '13 at 22:17
  • This is definitely not a good thing to have although it looks like a feature. I'm actually worried about my thesis now hehe. Can you try creating your plot with explicit line width declaration and then adding it with the same mechanism? The line width should be selected correctly I hope. – percusse Jan 13 '13 at 22:39

0 Answers0