4
$\begingroup$

Bug introduced in 12.2, fixed in 13.2.


Context

I have noticed both a glitch and a size issue between mathematica 12.1.1 and 12.2 when exporting to PDF a contour plot.

 $VersionNumber

(* 12.1 *)

 tt = 
 ContourPlot[x y, {x, 0, 1}, {y, 0, 1}, Contours -> 5, 
  ContourStyle -> None]

enter image description here

Export["~/Desktop/test2.pdf", tt] // FileSize

(* 36.06kB *)

whereas the same command in Mathematica 12.2

$VersionNumber

(* 12.2 *)

tt = ContourPlot[x y, {x, 0, 1}, {y, 0, 1}, Contours -> 5, 
   ContourStyle -> None];

Export["~/Desktop/test.pdf", tt] // FileSize

(* 102.21kB *)


On top of that on both version if one zooms on the edge of the graph in the produced pdf there are some glitches (edges of trianges?) which are number of contours dependent

tt = ContourPlot[x y, {x, 0, 1},{y, 0, 1}, 
  Contours -> 50, 
  ContourStyle -> None];
Export["~/Desktop/test.pdf", tt] // FileSize

enter image description here

This seems to occur in both 12.1.1 and 12.2.

Note that the glitch does not appear within Mathematica and can be seen in Illustrator and Acrobat and Preview.

Question 1

Could someone please confirm this size problem.

Question 2

Could someone please confirm this glitch problem.

Question 3

Is it possible to force Mathematica 12.2 to produce small files like Mathematica 12.1.1?

$\endgroup$
2
  • 1
    $\begingroup$ I have v. 12.0 (Win10-64). I cannot reproduce the PDF export issue (there are no artifacts in the PDF file visible at a similar magnification when opened in Acrobat). I do confirm the file size: mine was 37.69kB. $\endgroup$
    – MarcoB
    Commented Feb 5, 2021 at 14:46
  • 1
    $\begingroup$ I see the same glitches on the edges and along the contours as well on Mathematica 12.1 on Linux. File size is 30.532 kB. $\endgroup$ Commented Mar 15, 2021 at 17:34

1 Answer 1

3
$\begingroup$

Just test this glitch problem with v. 13.2 (Win11-64) and find it fixed.

$\endgroup$
2
  • 2
    $\begingroup$ This would be more appropriate as a comment. $\endgroup$
    – bbgodfrey
    Commented Dec 19, 2022 at 5:00
  • $\begingroup$ Mmm, on windows 13.2 still produces 34307 byte file. $\endgroup$ Commented Dec 19, 2022 at 11:51

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.