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

Home » Public Forums » archive » Device independent plotting
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Device independent plotting [message #70806] Wed, 05 May 2010 02:56
Karen is currently offline  Karen
Messages: 3
Registered: May 2010
Junior Member
I am using IDL workbench on a Mac at work and a PC at home and I'd
like my code to plot the same colours independent of device and
platform. I've downloaded the FSC_Color app and read the very helpful
documentation by David Fanning. I thought I had followed his
instructions carefully for how to get device independent colours, but
I can't make it work. At the moment, if I plot to the screen, I get
the classic red on black colour scheme, and in Postscript it only
plots the axes and labels.

The relevant part of my code looks like this:

;Initialise device independent colour routine
backColor = FSC_Color("White", !D.Table_Size-2)
envColor = FSC_Color("Red", !D.Table_Size-3)
dataColor = FSC_Color("Charcoal", !D.Table_Size-4)

!p.multi=[0,1,1]
set_plot,'ps'

minval=min(aftercoinciardata,/nan,max=maxval) ;find min and max for
plotting

;set up plot x axis and parameters with no data
plot,x,aftercoinciardata[0,*],/
nodata,yrange=[minval*1.5,maxval*1.5],ystyle=1,xtitle="time after
coinc(s) ",ytitle="IAR change(mWm!E-2!
N)",title=file,Background=backColor

for i=0L, (n_elements(aftercoinciardata[*,0])-1) do begin

oplot,x,aftercoinciardata[i,*],thick=0.25,Color=dataColor,li nestyle=1 ;plot
each line one by one
endfor

oplot,x,envelope_max,thick=3,color=envcolor ;red
oplot,x,envelope_min,thick=3,color=envcolor

device,/close

end
[Message index]
 
Read Message
Previous Topic: Creating a new image from an image input in IDL
Next Topic: Help needed in remapping data using IDL

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

Current Time: Wed Oct 08 15:18:48 PDT 2025

Total time taken to generate the page: 0.00226 seconds