gcalderone / Gnuplot.jl

Julia interface to gnuplot
Other
119 stars 16 forks source link

Output of figures #36

Closed ReiSato18 closed 3 years ago

ReiSato18 commented 3 years ago

Hi, I have a question.

When I output a file with eps, the label is not displayed. The complete picture can be output on jupyter notebook, but when I try to save the image as eps, the label is not displayed. How can this be resolved?

The environment is mac os Julia 1.5.0 Jupyter notebook is.

Sinceraly

on Jupyter notebook

スクリーンショット 2020-11-04 20 54 46

output file

スクリーンショット 2020-11-04 20 55 12
gcalderone commented 3 years ago

You are using the epslatex which produces two files:

You may include the LaTeX code in a document as follows:

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}
\usepackage{color}
\begin{document}
\begin{figure}
   \input{test.tex}
\end{figure}
\end{document}

See here for further info.

However you may simply wish to use the eps terminal:

save(term="eps fontscale 0.8", output="test.eps")

which would produce a self-contained EPS file.

ReiSato18 commented 3 years ago

I fully understood epslatex with your advice, thank you. But the second self-contained eps file you showed is very ideal for me and doesn't seem to work with latex. Is this reason related to gnuplot.jl? If there is a problem of latex, I solve by myself. I am sorry for the lack of understanding.

スクリーンショット 2020-11-07 22 16 21 スクリーンショット 2020-11-07 22 17 07
gcalderone commented 3 years ago

If you're trying to produce a PDF file from latex, try using pdf or pdfcairo as terminal in gnuplot.

ReiSato18 commented 3 years ago

Thank you for replaying.

but png and pdf file does not work well.... especially label ticks. below figure is pdf file

save(term="pdfcairo", output="test.pdf") save(term="pdf", output="test.pdf") outputs of above both two are same.

スクリーンショット 2020-11-10 1 44 39
gcalderone commented 3 years ago

That's pretty strange, all pdf, pdfcairo, png and pngcairo terminals work well for me. Try saving a PDF file using just gnuplot (type gnuplot on your shell), without using julia, to check whether there is a problem with your gnuplot installation. You will find plenty of examples on google..

ReiSato18 commented 3 years ago

Ok, Thank you for kind help!