I have been using ListContoutPlot
to plot some data and then export it to a pdf file.
Seeing as the ListContourPlot
has its own ideas regarding the placement of contours I've switched to ListDensityPlot
, thus having the right contours (as I wanted).
But this resulted in a new issue for me, before the switch the outputted pdf file's size was ~5MB, now I'm getting file's size at around ~200MB. What options do I have if I want to maintain at least one high-quality output file (vector based image)?
I'm trying to keep an un-rasterized image file, but not at all cost.
EDIT
Minimal working example:
On Mathematica 10.0.1.0, the resulting pdf's file size are 74.2kB for the ListContourPlot
and 22.6MB for the ListDensityPlot
.
data=Table[{x,y,RandomInteger[{1,7}]},{x,Range[100]},{y,Range[100]}];
op={ColorFunctionScaling->True,ColorFunction->"DarkBands",InterpolationOrder->0};
con=ListContourPlot[data,Evaluate@op];
den=ListDensityPlot[data,Evaluate@op];
Export["./con.pdf",con,"PDF"]; (* 74.2kB *)
Export["./den.pdf",den,"PDF"]; (* 22.6MB *)
Rasterize
the output. $\endgroup$Contours
forListContourPlot
? $\endgroup$