So I execute the following code displaying 3 colored 7x7 array images, and the .eps file that is created has its displayed data smoothed/interpolated, even though I specify interpolate=0. If i set_plot,'X' and comment out the device commands, the displayed image is not interpolated and is thus fine. I wish to not have interpolation - am I doing something wrong or am I seeing a bug?
EXAMPLE using set_plot,'ps':
http://imgur.com/LpzRVmD
EXAMPLE using set_plot,'X' and no device commands
http://imgur.com/s8c8uX6
CODE EXAMPLE:
pro test
set_plot,'ps'
; Example data
data_1 = findgen(7,7)
data_2 = findgen(7,7)+2
data_3 = findgen(7,7)+3
device,filename='plot5.eps',/encapsul,/color
cgDisplay
maxdensity = max([data_1,data_2,data_3])
mindensity = min([data_1,data_2,data_3])
!p.multi=[0,3,1]
cgloadct, 33
tvlct, rr, gg, bb, /get
palette = [ [rr], [gg], [bb] ]
axes_settings = {xticks:6,xtickname:['0','15','30','45','60','75','90'],xtic kv:[0,15,30,45,60,75,90],$
yticks:6,ytickname:['0','15','30','45','60','75','90'],ytick v:[0,15,30,45,60,75,90]}
; PLOT 1
ff = data_1
scaleddensity = bytscl(ff, min=mindensity, max=maxdensity)
; display the density plot.
cgimage, scaleddensity, /axes, palette=palette, axkeywords=axes_settings, $
xtitle='Theta', ytitle='Phi', title = 'Bias at 1 Rvir', xrange=[-7.5,97.5],yrange=[-7.5,97.5],$
position=[0.125, 0.125, 0.9, 0.7],color=cgcolor('black'),interpolate=0
cgcontour, ff, levels=(max(ff)-min(ff))*(findgen(6)+1.)/6.+min(ff), /onimage, $
c_colors=['black'] , $
c_thick=thick, c_charthick=thick
; PLOT 2
ff = data_2
scaleddensity = bytscl(ff, min=mindensity, max=maxdensity)
; display the density plot.
cgimage, scaleddensity, /axes, palette=palette,axkeywords=axes_settings, $
xtitle='Theta', ytitle='Phi', title = 'Bias at 2 Rvir', xrange=[-7.5,97.5],yrange=[-7.5,97.5],$
position=[0.125, 0.125, 0.9, 0.7],color=cgcolor('black'),interpolate=0
cgcontour, ff, levels=(max(ff)-min(ff))*(findgen(6)+1.)/6.+min(ff), /onimage, $
c_colors=['black'] , $
c_thick=thick, c_charthick=thick
; PLOT 3
ff = data_3
scaleddensity = bytscl(ff, min=mindensity, max=maxdensity)
; display the density plot.
cgimage, scaleddensity, /axes, palette=palette, axkeywords=axes_settings, $
xtitle='Theta', ytitle='Phi', title = 'Bias at 3 Rvir', xrange=[-7.5,97.5],yrange=[-7.5,97.5], $
position=[0.125, 0.125, 0.9, 0.7],color=cgcolor('black'),interpolate=0
cgcontour, ff, levels=(max(ff)-min(ff))*(findgen(6)+1.)/6.+min(ff), /onimage, $
c_colors=['black'] , $
c_thick=thick, c_charthick=thick
; PLOT COLORBAR
cgColorbar, Position=[0.125, 0.85, 0.9, 0.925], Title='M!dellipsoid!n(<R)/M!drandom!n(<R)', $
Range=[mindensity, maxDensity], NColors=254, Bottom=1, OOB_Low='gray', $
TLocation='Top',color=cgcolor('black')
device,/close
end
|