1
$\begingroup$

I am trying to export a ContourPlot with a Barlegend to pdf. Here's the simplest example (just the legend)

(Export["legend.pdf", #]; #) &@BarLegend["Rainbow"]

The output in the Notebook looks fine, but the pdf version has some white spaces on the top and the bottom, and some weird ticks on the bottom. I'm attaching a screenshot of the notebook output and the pdf.

I am on MacOS 15.5 and Mathematica 14.3. I tried with Mathematica on a Windows computer and there the pdf exports fine.

Any ideas? Thanks!

Notebook screenshot pdf screenshot

$\endgroup$
3
  • $\begingroup$ Duplicate of Weird frameticks appear in BarLegend with MMA14.3 which do not exist in MMA12.3. $\endgroup$ Commented Aug 29 at 21:10
  • $\begingroup$ Thank2 @Domen! I hadn't seen that post. Dang looks like no easy fix yet though. $\endgroup$ Commented Aug 29 at 21:53
  • $\begingroup$ Actually, that post did help - I now downloaded the old MMA14.0 and it works. Thanks again! $\endgroup$ Commented Aug 29 at 22:19

0

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.