;+ ; PRO thm_graphics_config ; ; This routine does just the graphics configuration for themis. It can be called from routines that ; need to have a guaranteed graphics configuration without forcing the rest of the themis initialization ; to be run. This is done to avoid overwriting settings that may have been set by users later in their ; session. ; ; Keywords: ; colortable: overwrite the default colortable initialization ; ; $LastChangedBy: bsadeghi $ ; $LastChangedDate: 2012-02-23 10:05:32 -0800 (Thu, 23 Feb 2012) $ ; $LastChangedRevision: 9834 $ ; $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/thmsoc/tags/tdas_8_00/idl/themis/common/thm_graphics_config.pro $ ; ;- pro thm_graphics_config,colortable=colortable ;ctable_file = file_retrieve(ctable_relpath, _extra=!themis) ;setenv, 'IDL_CT_FILE='+ctable_file ;This routine sets the IDL_CT_FILE env variable to a local file ;So that it doesn't need to be downloaded ; thmctpath if n_elements(colortable) eq 0 then colortable = 43 ; default color table ; Define POSTSCRIPT color table old_dev = !d.name ; save current device name set_plot,'PS' ; change to PS so we can edit the font mapping loadct2,colortable device,/symbol,font_index=19 ;set font !19 to Symbol set_plot,old_dev ; revert to old device ; Color table for ordinary windows loadct2,colortable ; Make black on white background !p.background = !d.table_size-1 ; White background (color table 34) !p.color=0 ; Black Pen !p.font = -1 ; Use default fonts if !d.name eq 'WIN' then begin device,decompose = 0 endif if !d.name eq 'X' then begin ; device,pseudo_color=8 ;fixes color table problem for machines with 24-bit color device,decompose = 0 if !version.os_family eq 'unix' then device,retain=2 ; Unix family does not provide backing store by default endif end