1
$\begingroup$

This post is somewhat related to this one.

We generate a density plot and stored it in plot variable.

plot = ListDensityPlot[{{1, 1, 1, 1}, {1, 2, 1, 2}, {1, 1, 3, 1}, {1, 
    2, 1, 4}}, Mesh -> All];

then Export it as pdf and Import it back,

Export["density.pdf", plot];
Import["density.pdf"]

we got an eror

Import::general: Unsupported Shading type 7

Import::general: Could not create shading pattern

Import::general: Could not create pattern from /p5

General::stop: Further output of Import::general will be suppressed during this calculation.

What is wrong? How to workaround this issue when importing pdf back?

$\endgroup$
  • 1
    $\begingroup$ Try Export["density.pdf", plot, "PDF", "AllowRasterization" -> True]; Import["density.pdf"]. It works... $\endgroup$ – José Antonio Díaz Navas Apr 30 '18 at 9:47
  • $\begingroup$ @JoséAntonioDíazNavas Thank you so much. It works $\endgroup$ – matheorem May 1 '18 at 2:00

Your Answer

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

Browse other questions tagged or ask your own question.