;+ ; NAME: ; xy2psym10 ; PURPOSE: ; Simulate the !p.psym=10 (histogram type plotting) setting but ; return the actual data values used to do this. Thus filled ; histograms can be made using polyfill. ; ; CALLING SEQUENCE: ; XY2PSYM10,X,Y ; ; INPUTS: ; X,Y = The original data to be plotted ; ; OUTPUTS: ; X,Y = Output data is nearly 2 X size of the input x,y contains ; the vertices defining a histogram style plot ; ; EXAMPLE: ; Given x and y, ; IDL> !p.psym = 0 ; IDL> xy2psym10,x,y ; IDL> plot,x,y ; IDL> polyfill,x,y,color=150 ; ; MODIFICATION HISTORY: ; Written by: Trevor Harris, Physics Dept., University of Adelaide, ; July, 1990. ;- pro xy2psym10,xx,yy num = n_elements(xx) inc = (xx(1)-xx(0))*0.5 maxx = max(xx,min=minx) x = fltarr(2*num) y = x i = indgen(num)*2. x(i) = xx-inc y(i) = yy x(i+1) = xx+inc y(i+1) = yy x = ([minx,x,maxx] < maxx) > minx y = [0,y,0] xx = x yy = y return end