0

A have density plot in Mathematica as

  ShowLegend[
DensityPlot[Sin[x y], {x, 0, \[Pi]}, {y, 0, \[Pi]}, Mesh -> False, 
PlotPoints -> 30], {ColorData["LakeColors"][1 - #1] &, 10, " 1", 
"-1", LegendPosition -> {1.1, -.4}}]

and corresponding plot is enter image description here

When I save this plot as .eps and want to use in Miktex as

\documentclass[a4paper,pra,preprint]{revtex4}

\usepackage{pstool}
\usepackage{mathptmx}
\usepackage{newtxmath}
\usepackage{epstopdf}
\begin{document}
{\includegraphics[width=0.45\textwidth]{ttc.eps}}
\end{document}

Then after generating .pdf I get the following kind of plot enter image description here

As it is clear from figure, there is missing legend "1". I have no idea, what is going on and how to fix it.

  • Are you able to provide the eps file? – Peter Ebelsberger Apr 28 '15 at 17:07
  • Did you try making a PDF file directly with the epstopdf command line tool? Do you get the same missing "1"? – Thruston Apr 28 '15 at 17:10
  • You also can try the excellent epspdf utility, which has a Windows graphical interface and an installer, available from CTAN – Bernard Apr 28 '15 at 19:14
  • using CTAN helped, but why in Miktex it is giving such kind of result – zenith Apr 29 '15 at 9:14
  • @Thruston I dont use command line tool? can you please tell the details – zenith Apr 29 '15 at 13:41
1

You can save your plot as a pdf file in mathematica; for example, "ttc.pdf". And then include it into your tex file

\includegraphics[width=0.45\textwidth]{ttc.pdf}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.