From 294d4c5867898500dba123155934c5737a07be11 Mon Sep 17 00:00:00 2001 From: Annie Hughes Date: Thu, 6 Oct 2022 12:53:42 +0200 Subject: [PATCH] tidied up auxiliary directories --- src/idl_misc/JPBLib_for_Dustemwrap/plot_negative_log.pro | 150 ------------------------------------------------------------------------------------------------------------------------------------------------------ 1 file changed, 0 insertions(+), 150 deletions(-) delete mode 100644 src/idl_misc/JPBLib_for_Dustemwrap/plot_negative_log.pro diff --git a/src/idl_misc/JPBLib_for_Dustemwrap/plot_negative_log.pro b/src/idl_misc/JPBLib_for_Dustemwrap/plot_negative_log.pro deleted file mode 100644 index 40df616..0000000 --- a/src/idl_misc/JPBLib_for_Dustemwrap/plot_negative_log.pro +++ /dev/null @@ -1,150 +0,0 @@ -PRO plot_negative_log,x,y,help=help,ppositions=ppositions,dy=dy,positive_only=positive_only,negative_only=negative_only,_extra=_extra - -;+ -; NAME: -; plot_negative_log -; CALLING SEQUENCE: -; plot_negative_log,x,y,_extra=_extra -; PURPOSE: -; plots an array in log scale including negative values in two half-plots -; INPUTS: -; x = x vector to plot -; y = y vector to plot -; OPTIONAL INPUT: -; ppositions = a 4-element vector for global plot position in the window -; dy = fractional distance between the two half-plots along y -; ACCEPTED KEY-WORDS: -; _extra is filtered and passed to cgplot -; EXAMPLES -;x=[0,1,2,3,4,7,12] & y=[1.e-2,2,-1,-2,-5,-10,-50.] -;plot_negative_log,x,y,xtitle='x',ytitle='y',xrange=[-1,15],/xsty,yrange=[0.001,100],/ysty,ppositions=[0.3,0.2,0.8,0.9],dy=0.001 -;x=lindgen(1000)/500. & y=sin(x*10)*exp(-x*2.)*1.e2 -;plot_negative_log,x,y,xtitle='x',ytitle='y',xrange=[-0.1,2.],/xsty,yrange=[0.001,100],/ysty -; -; OUTPUTS: -; None -; OPTIONAL OUTPUTS: -; None -; PROCEDURE AND SUBROUTINE USED -; -; COMMONS: -; -; SIDE EFFECTS: -; The two half plots are forced to have the same (reflected) y axis. -; MODIFICATION HISTORY: -; written 28-06-22 by Jean-Philippe Bernard -;- - -IF keyword_set(help) THEN BEGIN - doc_library,'plot_negative_log' - goto,sortie -ENDIF - -defsysv,'!previous_yrange',exist=exist -IF not exist THEN defsysv,'!previous_yrange',ptr_new() - -indpos=where(y GT 0,countpos) -indneg=where(y LT 0,countneg) -maskpos=y*0 -maskneg=y*0 -maskpos[indpos]=1 -maskneg[indneg]=1 - -df_pos=find_ind(maskpos,1,count=count_pos_regions) -df_neg=find_ind(maskneg,1,count=count_neg_regions) - -;print,df_pos -;print,'-----' -;print,df_neg - -Nx=1 & Ny=2 -IF not keyword_set(ppositions) THEN BEGIN - x0=0.10 & y0=0.10 - x1=0.90 & y1=0.90 -ENDIF ELSE BEGIN - x0=ppositions[0] & y0=ppositions[1] - x1=ppositions[2] & y1=ppositions[3] -ENDELSE -dx=0.15 ;not used anywy for this plot -use_dy=0.05 -IF keyword_set(dy) THEN BEGIN - use_dy=dy -ENDIF - -pp=make_ppositions(x0,y0,x1,y1,dx,use_dy,Nx,Ny,xtit_plot=xtit_plot,ytit_plot=ytit_plot, $ - noerase=noerase,xcharsize=xcharsize,ycharsize=ycharsize,/silent) - -i=0L -IF countpos NE 0 THEN BEGIN - IF not keyword_set(negative_only) THEN BEGIN - ;cgplot,x[indpos],y[indpos],_extra=_extra,/ylog - !p.position=pp[*,i] - cgplot,x[indpos],y[indpos],noerase=noerase[i],xcharsize=xcharsize[i],ycharsize=ycharsize[i],xtit=xtit,ytit=ytit,_extra=_extra,/ylog,/nodata - FOR k=0L,count_pos_regions-1 DO BEGIN - cgoplot,x[df_pos[k,0]:df_pos[k,1]],y[df_pos[k,0]:df_pos[k,1]],_extra=_extra - ENDFOR - ENDIF - i=i+1 -ENDIF - -; IF keyword_set(_extra) THEN BEGIN -; yyrange=get_extra(_extra=_extra,'YRANGE',count=count) -; IF count NE 0 THEN BEGIN -; yrange=yyrange -; ENDIF ELSE BEGIN -; yrange=!y.crange -; ENDELSE -; ENDIF ELSE BEGIN -; yrange=!y.crange -; ENDELSE - -yrange=!y.crange - -!previous_yrange=ptr_new(yrange) - -new_yrange=10^[(*!previous_yrange)[1],(*!previous_yrange)[0]] - -IF keyword_set(_extra) THEN BEGIN - _extrabis=modify_extra(_extra=_extra,'YRANGE',new_yrange,/replace) -ENDIF - -; IF keyword_set(_extra) THEN BEGIN -; yrange=get_extra(_extra=_extra,'YRANGE',count=count) -; ; stop -; IF count NE 0 THEN BEGIN -; new_yrange=yrange -; new_yrange[1]=yrange[0] -; new_yrange[0]=yrange[1] -; ;stop -; _extrabis=modify_extra(_extra=_extra,'YRANGE',new_yrange,/replace) -; ENDIF ELSE BEGIN -; yrange=!y.crange -; new_yrange=[(!x.crange)[1],(!x.crange)[0]] -; _extrabis=modify_extra(_extra=_extra,'YRANGE',new_yrange,/replace) -; ENDELSE -; ENDIF ELSE BEGIN -; yrange=!y.crange -; new_yrange=[(!x.crange)[1],(!x.crange)[0]] -; _extrabis=modify_extra(_extra=_extra,'YRANGE',new_yrange,/replace) -; ENDELSE - -;stop - -IF countneg NE 0 THEN BEGIN - IF not keyword_set(positive_only) THEN BEGIN - !p.position=pp[*,i] - ; cgplot,x[indneg],-1.*y[indneg],noerase=noerase[i],xcharsize=xcharsize[i],ycharsize=ycharsize[i],xtit=xtit,ytit=ytit,_extra=_extrabis,/ylog - cgplot,x[indneg],-1.*y[indneg],noerase=noerase[i],xcharsize=xcharsize[i],ycharsize=ycharsize[i],xtit=xtit,ytit=ytit,_extra=_extrabis,/ylog,/nodata,yrange=new_yrange - FOR k=0L,count_neg_regions-1 DO BEGIN - cgoplot,x[df_neg[k,0]:df_neg[k,1]],-1.*y[df_neg[k,0]:df_neg[k,1]],_extra=_extra - ENDFOR - ENDIF -ENDIF - -sortie: - -;stop - -END - - -- libgit2 0.21.2