I am currently using IDL 8.5.1 (experienced the same issue with 8.4 and 8.5.0) on Windows 10 machine (x64).
The code I used follows (which is on https://www.harrisgeospatial.com/docs..., except a bit of modification since BARPLOT does not have DATA keyword)
x = FINDGEN(41)/10 - 2
gauss = EXP(-x^2)
p = BARPLOT(x, gauss, $
TITLE='Gaussian Distribution',$
YRANGE=[0,1.1])
On the graphic window, the plot does not show any kind of defect.
However, whenever I try to export it into other formats, that is, calling CopyWindow method, Save method, or clicking on the little "save" icon on plot window, some of the plot's texts are replaced by black rectangle. Following is what I did to save to a plot, with the same reference with the upper code
p.Save, "gaussian.png", BORDER=10, $
RESOLUTION=300, /TRANSPARENT
This phenomenon is a bit random; I cannot reproduce the situation. Running exactly the same code repeatedly would yield different results. The code above would probably work fine after I restart my computer. But then again, another code will make similar bug. For example, if I use an existing plot (whose .png save file showed no bug) to change data only by SetData method, then save again, it would destroy my axis titles, and vice versa. Also, I cannot avoid the problem by any means. I tried reducing widths and heights, refreshing window, waiting some secs after refresh, ..., but those measures are not helping.
This is by far the worst bug I've ever experienced using IDL.
Does anyone know how to resolve this?
|