on the background color of cgplot [message #84469] |
Sun, 26 May 2013 11:36 |
simona bellavista
Messages: 56 Registered: December 2009
|
Member |
|
|
I have a peculiar problem with cgplot, the background is red and the points that are supposed to be black are cyan. This only happen when I connect to the computer cluster via vnc and use cgplot. If I use 'plot' instead of 'cgplot', I correctly get a black on white figure.
I noticed that if I put explictly background=cgcolor('white') in the cgplot, the background is correctly white. While if I put color=cgcolor('black'), the points are black but the axes are still cyan. I would like to set the background and the color once at the beginning before calling cgplot. Is this possible?
For completeness I attach the IDL initializing script, where I set the device, the color table, etc
!EDIT_INPUT = 200
if(!version.os_family eq 'unix') then device, true_color=24
window, /free, /pixmap, colors=-10
wdelete, !d.window
device, retain=2, decomposed=0, set_character_size=[10,12]
device, get_visual_depth=depth
print, 'Display depth: ',depth
print, 'Colour table size: ',!d.table_size
loadct,39; ,/silent
scale = float(!d.table_size)/256.
black = fix( 0.*scale)
white = fix( 255.*scale)
|
|
|