cico
unread,Mar 7, 2013, 6:56:44 AM3/7/13You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to
Dear everyone,
I am quite novel of IDL and any help will be much appreciated, that's the issue:
I am trying to get a jpg figure of a coloured plot but what that I obtaining it’s a jpg with three similar plots. Something is definitely wrong but I am able to find what the problem is, could you please help me.
Many thanks
Below the code that I wrote:
------------------------------------------------
pro plot_jpg
;set Z buffer
set_plot,'Z',/copy
device,set_resolution=[700,450],Z_buffer=0
erase
;set color
RED = [0, 1, 1, 0, 0,1]
GREEN = [0, 1, 0, 1, 0,1]
BLUE = [0, 1, 0, 0, 1,0]
tvlct, Red * 255, Green * 255, Blue * 255
;data
a= findgen(100)
b= sin(a)/exp(a/20)
Plot, a,b, color=5
im=tvrd(/true)
write_jpeg,'test.jpeg',im,/true
device,Z_Buffer=1
set_plot,'WIN'
end
------------------------------------------------