sciapp / gr

GR framework: a graphics library for visualisation applications
Other
328 stars 54 forks source link

Artifacts in PDF exported `contourf` plot #88

Closed englhardt closed 5 years ago

englhardt commented 5 years ago

Exporting a contourf plot as PDF sometimes produces weird artifacts: image

bug_py.pdf

The artifacts appear on Windows with Adobe Acrobat Reader DC (2019.012.20035) and Internet Explorer (11.0.9600.19404) and on Linux with Okular (1.7.3). The artifacts do not appear with Google Chrome (76.0.3809.87) for both Windows and Linux.

Minimal example in Python to produce the plot.

import platform
import gr
platform.platform() #'Linux-4.19.60-1-MANJARO-x86_64-with-arch-Manjaro-Linux'
gr.__version__ # 1.11.0
import numpy as np
from gr.pygr import mlab
mlab.contourf(np.array(range(100), ndmin=2) * np.array(range(100), ndmin=2).T)
mlab.savefig("bug_py.pdf")

A similar example in Julia produces the same artifacts.

danielkaiser commented 5 years ago

This issue should be fixed in the latest commit on master (80b25820758db5d1d76199db496e9cd557bab8d0). Could you please try again using this version?

danielkaiser commented 5 years ago

I'm closing this issue because it should be fixed with the new v0.41.1 release. If you still encounter this problem feel free to reopen this issue.

englhardt commented 5 years ago

I can confirm that this is fixed in v0.41.1. Thanks!