1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71
|
;
; AC June 2007
;
; quick tests for Linestyle as keyword or !p.linestyle
;
; --------------------------
; This first procedure will help to checked whether the swith
; between modes (!p.linestyle vs keyword linstyle=) is OK
;
pro test_switch_linestyle
;
!p.multi=[0,2,2]
;
a=findgen(10)
;
; we reset linestyle to continuous line
!p.linestyle=0
;
plot, title='No line Style', a
;
plot, title='Line Style via keyword', a, line=2
;
!p.linestyle=3
plot, title='Line Style via !!P.linestyle', a
;
!p.linestyle=5
plot, title='Line Style via !!P.linestyle AND keyword (prioritary)', a, line=1
;
!p.multi=0
!p.linestyle=0
;
end
;
; -------------------------------------
; testing the 6 linestyles minicing the IDL ones.
;
pro multi_linestyle, signal=signal
; see plplot-5.X.Y/doc/docbook/src/plstyl.html
; or http://plplot.sourceforge.net/docbook-manual/plplot-html-5.7.3/plstyl.html
;
window, xsize=900, ysize=600
!p.multi=[0,3,2]
;
styles=findgen(6)
nb_styles=6
;
if (N_ELEMENTS(signal) LE 0) then a=findgen(10) else a=signal
;
for i=0, nb_styles-1 do begin
plot, a, linestyle=styles[i], title='linestyle:'+string(i)
endfor
;
!p.multi=0
;
end
;
; ------------------------------
; same than the previous one but with a sinus ...
;
pro sinus_line
nbp=500
a=sin(findgen(nbp)/nbp*!pi*2.*4)
multi_linestyle, signal=a
end
; ----------------------
; directly running an example !
;
pro TEST_PLOT_LINESTYLE
multi_linestyle
end
|