Transparent plot

Perfect. With option -n I get the desired output.
Thank you!
transtex.pdf (23.6 KB)

So you have some setup in the rootlogon.C file which creates that problem.
Ok fine.

Thanks couet for the instructions, I managed to get a transparent canvas in the pdf output.

Now, I tried to save the canvas as .tex

c->SaveAs("trans.tex")

and then include it in my latex document “test_transparent.tex”

\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{patterns}
\usetikzlibrary{plotmarks}
\begin{document}
\begin{figure}
\input{trans.tex}
\caption{Image ({\tt trans.tex}) generated thanks to {\tt TTeXDump}}
\end{figure}
\end{document}

When compiling with “pdflatex test_transparent.tex”, the resulting background is black (see attached pdf), so I think there is a bug in the .tex export function. If I hack the “trans.tex” file by removing these three lines, the background is correctly transparent:

\definecolor{c}{rgb}{1,1,1};
\draw [pattern=, pattern color=c] (0,0) rectangle (20,13.5632);
\draw [pattern=, pattern color=c] (0,0) rectangle (20,13.5632);

This hack removes also the bounding box (transparent space around the histogram), which is interesting as this extra white space is normally not needed when inserting into a latex document, which manages by himself the separation with normal text and so on.

But maybe, one could add a boolean option to the export function to .tex such that:

  • Normal behaviour: draw a bounding rectangle with transparent fill color (correct the “black bug”).
  • Remove bounding box behaviour: remove completely the bounding rectangle.

The second option would also be interesting for the SaveAs(".pdf") function. Otherwise, one has to open each pdf figure in inkscape, and save it again as pdf with “export area is drawing” option instead of “save area is page”.
test_transparent.pdf (30.5 KB)

Transparency does not work for Tex output

This issue is now solved in v5-34-26, TTexDump can handle transparent pads. Thanks.

I have a question on this. I found that, one has to invoke the lines on every single object which might span an area in the canvas, be they pads, boxes etc. I tried with gStyle->SetFillColor(0); ... etc (same lines that I use for canvas etc) and it does not work. This is rather cumbersome, is there a way to apply this globally?

Maybe related, but it seems that I must invoke -n for this to work. This confuses me, since I don’t have any rootrc or rootlogon.C files. Why is this so?

Cheers,
Afiq

This as nothing to do with transparency in TLatex. Can you make an other post with an example showing your problem ?