comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Using Postscript & Colours in IDL
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Using Postscript & Colours in IDL [message #58335] Mon, 28 January 2008 01:47 Go to previous message
chloesharrocks is currently offline  chloesharrocks
Messages: 16
Registered: January 2008
Junior Member
Hi

I'm new to IDL and the concept of postscript, so this is probably a
really naive question, but I'm having difficulties with getting my
postscript plots to be in colour. An extract of my code is below:

=====
device, decomposed=0 ;specify I'm using Indexed Colors
loadcolors ;loads graphics colors

;If we also want to consider a specific period of time
;Here we will look at scatter plot for first 5years only
j = 0 ;Here we specify which measurement in time, eg. the first one

entry_device = !d.name
set_plot, 'PS'
device, /color, /landscape, font_size=12, filename='FullScatterPlot' +
STRTRIM(N, 1) + 'runs.ps'
!P.Multi=0
plot, temp_change, precip_change, xrange=[-2,8], yrange=[-3E-6, 5E-6],
xstyle=1, ystyle=1, $
title='A Scatter Plot of Precipitation Against Temperature for Years
0-5 for ' + STRTRIM(N, 1) + ' Runs', $
;subtitle='Green Diamonds=0-5years, Red Triangles=5-10years & Blue
Squares=10-15years', $
xtitle='Global Mean Surface Air Temperature Change (Kelvin)', $
ytitle='Global Mean Precipitation Change (Kg/[m^2*s])', /nodata,
background=7, color=0
oplot, temp_change[j:j+19,run_no:run_no+(N-1)], precip_change[j:j
+19,run_no:run_no+(N-1)], psym=4, color=4
oplot, temp_change[j+20:j+39,run_no:run_no+(N-1)], precip_change[j
+20:j+39,run_no:run_no+(N-1)], psym=5, color=5
oplot, temp_change[j+40:j+59,run_no:run_no+(N-1)], precip_change[j
+40:j+59,run_no:run_no+(N-1)], psym=6, color=6
device, /close_file
set_plot, entry_device
=====

Most of the time this works fine, but occaisionally when I run the
program it comes up with an error on the "device, decomposed=0" line.
However, if I shut down IDL and restart it it will work fine again.
Also, although "color=4" looks lime green on my computer, when I print
it, the colour is more of a bluey-turquoise colour and similarly the
"color=5" which is red looks magenta when printed (is this likely to
be to do with the printer?). If someone, could explain to me how to
incorporate colour into postscript files in a way that doesn't cause
this error every time I'd be most grateful. This is my first time
using IDL and my first ever encounter with postscript files (I'm an
undergraduate at Uni).

Thanks
ChloƩ
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: working dir in IDL 7
Next Topic: Re: Simple File I/O

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 19:09:47 PDT 2025

Total time taken to generate the page: 0.00817 seconds