BG writes:
> Could someone please suggest how I refer to those double tilde(~)
> symbols on the y-axis which indicate a break in the continuity of the
> scale? for example, as you read up the y-axis units, one might see:
> 0, 1, 2, 3, 4 double (~), 17, 18, 19, 20 (a log scale wouldn't show
> the fine detail of data in both areas.)
>
> Is this possible to do with IDL?
Here is an example of something very like it:
;*********************************************************** **********
PRO Test
; Create a suitable data set.
data = RandomU(-3L, 50) * 500
index = Where((data GT 250) AND (data LT 400), count)
IF count GT 0 THEN data[index] = data[index] + 150
index = Where((data GT 100) AND (data LE 250), count)
IF count GT 0 THEN data[index] = data[index] - 150
index = Where(data LT 0, count)
IF count GT 0 THEN data[index] = -data[index]
x = Indgen(50)
y = data
; Draw a normal plot of the data.
Window, 4, Title='Normal Plot of Data'
Plot, x, y, /NoData, Position=[0.15, 0.15, 0.95, 0.95], $
XTitle='Time', YTitle='Signal'
Oplot, x, y, PSym=4
; Draw a modified plot of the data. First, draw the
; lower half of the plot.
Window, 5, Title='Modified Plot of Data'
Plot, x, y, YRange=[0, 110], YStyle=1, XStyle=8, $
Position=[0.15, 0.15, 0.95, 0.50], /NoData, $
XTitle='Time'
index = Where(y LT 100, count)
IF count GT 0 THEN OPlot, x[index], y[index], PSym=4
; Draw the jagged lines that interrupt the plot.
ys = !Y.Window[1]
PlotS, [0.150, 0.183, 0.117, 0.183, 0.150], /Normal, $
[ys, ys+0.025, ys+0.05, ys+0.075, ys+0.1]
ys = !Y.Window[1]
PlotS, [0.950, 0.983, 0.917, 0.983, 0.950], /Normal, $
[ys, ys+0.025, ys+0.05, ys+0.075, ys+0.1]
; Draw the second half of the plot.
Plot, x, y, YRange=[390, 600], YStyle=1, XStyle=4, $
Position=[0.15, 0.60, 0.95, 0.95], /NoData, /NoErase
index = Where(y GT 400, count)
IF count GT 0 THEN OPlot, x[index], y[index], PSym=4
; Clean up by completing the parts of the plot that still
; need to be drawn.
Axis, XAxis=1, XTickformat='(A1)'
XYOutS, 0.05, 0.55, 'Signal', Orientation=90, /Normal, $
Alignment=0.5
END
;*********************************************************** **********
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|