Skip to content

Instantly share code, notes, and snippets.

@adamabernathy
Created May 6, 2015 03:05
Show Gist options
  • Select an option

  • Save adamabernathy/990cf0251703dbca62a2 to your computer and use it in GitHub Desktop.

Select an option

Save adamabernathy/990cf0251703dbca62a2 to your computer and use it in GitHub Desktop.
Starter code for plotting in IDL
; ---------------------------------------------------------------------
; Plot the results
; ---------------------------------------------------------------------
; Configure display
; Load and modify color pallet. Using IDL 8.0 friendly pallet
common colors, r_orig,g_orig,b_orig,r_curr,g_curr,b_curr
loadct,12,/silent
!p.background=!d.n_colors-1
r_curr = reverse(r_curr)
g_curr = reverse(g_curr)
b_curr = reverse(b_curr)
r_curr[254] = 0 & g_curr[254] = 0 & b_curr[254] = 0
r_curr[255] = 255 & g_curr[255] = 255 & b_curr[255] = 255
r_curr[253] = 200 & g_curr[253] = 200 & b_curr[253] = 200
black=254 & white=255 & grey=253 & red=50 & blue=155 & green=200
; Set screen size
xwin=1100.*1.00 ; plot x dim
ywin=500.*1.00 ; plot y dim
!p.font=2
font_size=1.
; Using position_plots
numplots_x=2
numplots_y=1
xr=0.15 & xl=0.92
yb=0.15 & yt=0.79
sx=0.07 & sy=0.10
position_plots,xr,xl,yb,yt,sx,sy,numplots_x,numplots_y,pos
; Colors
!p.background=255 ;white
set_plot,'z'
device,set_resolution=[xwin,ywin],DECOMPOSED=0
erase
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment