There is a known bug with IDL 8.8.x on Mac & Linux systems which affects on-screen rendering. Some things impacted include transparency, anti-aliasing, and zvalues (which items get drawn in front vs back). One thing you can try is changing between hardware and software rendering on your machine. Use this command to enable software rendering: PREF_SET,'IDL_GR_X_RENDERER',1,/COMMIT Then test your IDL code again to see if the transparency issue is resolved. If not, try hardware rendering with this: PREF_SET,'IDL_GR_X_RENDERER',0,/COMMIT If changing between hardware and software rendering does not improve the issue, as a work-around the following code path may help with visualizing your desired graphic on-screen. Basically this method plots the graphic to the off-screen buffer, saves it to disk, then reimages the file for viewing to the screen. This should display the correct transparency. ;BEGIN IDL PRO CODE EXAMPLE ; Specify the file to use for the plot. testFile = FILEPATH('ScatterplotData.csv', $ SUBDIRECTORY = ['examples', 'data']) ; Read the file and assign it to the sed_data variable; ; assign the header information to variables for use later. sed_data = READ_CSV(testFile, HEADER=sedHeader, $ N_TABLE_HEADER=1, TABLE_HEADER=sedTableHeader) ;Set transparency for points on plot scatTransparency=90 ; Create the plot with x-axis:FIELD1 and y-axis:FIELD2 dist_size = SCATTERPLOT(sed_data.FIELD1, sed_data.FIELD2, $ SYMBOL='star', /SYM_FILLED, RGB_TABLE=7, trans=scatTransparency, $ XTITLE='Distance from Glacier Terminus in Meters', $ YTITLE='Mean Particle Size in Millimeters', $ TITLE='Sediment Distribution at the Terminus of Tidewater Glaciers, AK', $ MAGNITUDE=sed_data.FIELD3,/buffer) dist_size.save, 'test.png',border=20,res=200 dist_size.close im = image('test.png',margin=0) end
|