0
$\begingroup$

Is there an easy way to export a raster DensityPlot or ListDensityPlot but with vector axes, lines and label? I didn't find an easy answer in other questions.

$\endgroup$
  • $\begingroup$ See Rasterized density plot with vector axes and Saner alternative to ContourPlot fill and the questions linked there. $\endgroup$ – MarcoB May 23 '18 at 15:54
  • $\begingroup$ Thank you, Marco. But they don't seem to answer to the question. Is it possible that there is not an easy and compact solution? $\endgroup$ – jset May 23 '18 at 15:59
  • 1
    $\begingroup$ rasterizeBackground? $\endgroup$ – corey979 May 23 '18 at 19:48
  • $\begingroup$ Ok, thank you. It works if PlotLegends is not specified in the original Plot. Do you have an idea how to modify rasterizeBackground ? $\endgroup$ – jset May 24 '18 at 9:27
  • $\begingroup$ In the end I solved it by plotting the original image without PlotLegends, then by using Legended: imgLegended=Legended[rasterizeBackground[img], Placed[BarLedend[...],position]] and exporting it with Export["filename.pdf",imgLegended] $\endgroup$ – jset May 24 '18 at 12:01

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.