5
$\begingroup$

I read the answered question here which was for 7 years ago. I want to use DensityPlot3D function to draw a figure and save it as eps, pdf, or SVG as a vectorized image to keep its high quality for presentation. But what I get is a very low-quality image which is not a vectorized image! I changed the ImageSize, ImageResolution, and AllowRasterization option but neither of them did not work! First, I sued the Export function without any arguments. I could not get any good results. Then, to increase the output quality I tried this code to export my figure:

Fig = DensityPlot3D[myFunction] ;
Export["figure.eps",fig, ImageResolution-> 1000];

But still, I could not get any vector graphic for the figure.eps file.

Any help and hint are appreciated!

enter image description here

$\endgroup$
2
  • $\begingroup$ I was able to reproduce the bug in the cloud on version 12. $\endgroup$
    – acacia
    Jan 17, 2021 at 4:08
  • $\begingroup$ You will be much better off with a pixel (not vector) graphics for this kind of plots. $\endgroup$
    – yarchik
    Jan 17, 2021 at 12:12

1 Answer 1

1
$\begingroup$

Do not use ImageSize, ImageResolution, AllowRasterization, Rasterize. These functions will convert a vector graphic to a raster. I have had good results using PDF export. After I export the PDF, I edit the PDF as text using notepad or notepad++. Search for /interpolate. When you find it change /interpolare=on to /interpolate=off.

UPDATE: I tested this today. I found that PlotPoints->100,ImageSize->1000 helps with getting a better raster but I actually don't think you will get vector graphics unless you start writing your own function. all you need to do is compose the labels manually using Placed, Show, Graphics. how exactly you do that would take a lot of time. The text does not scale when dragging the size of the graphics box with the mouse. I think it would be productive to send suggestions towards the development team so that they know what users want.

$\endgroup$
4
  • $\begingroup$ Without these parameters also I get a non-vector graphic! Where should I search? in Mathematica? $\endgroup$
    – Mojmal
    Jan 17, 2021 at 3:05
  • 1
    $\begingroup$ @Mojmal it is helpful to be more specific of what you have tried & what the result was. It is better to do this as en edit to your original question. Can you, please, do such a thing, so that we may better help you solve your problem? $\endgroup$ Jan 17, 2021 at 3:19
  • $\begingroup$ Sure! Thank you for your comment. $\endgroup$
    – Mojmal
    Jan 17, 2021 at 3:45
  • 1
    $\begingroup$ I have found that any Axes or Ticks, almost always result in a Raster in 12.1. $\endgroup$
    – adamhill
    Feb 20, 2021 at 4:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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