@@ -493,8 +493,8 @@ function bar(f::Function, range_x=nothing; first=true, kw...)
493493end
494494bar! (f:: Function , rang= nothing ; kw... ) = bar (f, rang; first= false , kw... )
495495
496- bar (arg1, arg2; first= true , kw... ) = common_plot_xyz (" " , cat_2_arg2 (arg1, arg2, true ), " bar" , first, false ; kw... )
497- bar! (arg1, arg2; kw... ) = common_plot_xyz (" " , cat_2_arg2 (arg1, arg2, true ), " bar" , false , false ; kw... )
496+ bar (arg1, arg2; first= true , kw... ) = common_plot_xyz (" " , cat_2_arg2 (arg1, Float64 .( arg2) , true ), " bar" , first, false ; kw... )
497+ bar! (arg1, arg2; kw... ) = common_plot_xyz (" " , cat_2_arg2 (arg1, Float64 .( arg2) , true ), " bar" , false , false ; kw... )
498498bar (arg; kw... ) = bar (" " , arg; kw... )
499499bar! (arg; kw... ) = common_plot_xyz (" " , cat_1_arg (arg, true ), " bar" , false , false ; kw... )
500500# ------------------------------------------------------------------------------------------------------
@@ -2251,38 +2251,44 @@ Plot a stereonet map in either Schmidt or Wulff projection.
22512251 and line & marker settings (see ``plots`` manual for details on them).
22522252
22532253In case the produced figure is still not satisfactory, you can make one by yourself.
2254- For that use the `Dv, Dp = _stereonet (mat)` function to get the fault planes and poles. A good place
2254+ For that use the `Dv, Dp = stereonet_data (mat)` function to get the fault planes and poles. A good place
22552255to start is the `stereonet` function itself. Type ``@edit GMT.stereonet([0 0])`` to see the code.
22562256
22572257### Example
22582258```julia
2259- stereonet([90 30; 180 45; 270 60; 0 15; 30 45; 120 48; 225 27; 350 80])
2259+ stereonet([90 30; 180 45; 270 60; 0 15; 30 45; 120 48; 225 27; 350 80], show=true )
22602260```
22612261"""
22622262function stereonet (mat:: AbstractArray{T,2} ; first= true , schmidt= true , wulff= false , kw... ) where T<: Real
22632263 d = KW (kw)
2264- show = (find_in_dict (d, [:show ])[1 ] != = nothing ) ? false : true # DEfault is 'true'.
2264+ _stereonet (mat, first, schmidt, wulff, d)
2265+ end
2266+ function _stereonet (mat:: AbstractArray{T,2} , first:: Bool , schmidt:: Bool , wulff:: Bool , d) where T<: Real
2267+ show = ((val = find_in_dict (d, [:show ])[1 ]) != = nothing && val != 0 )
2268+ savefig = find_in_dict (d, [:savefig :figname :name ])[1 ];
2269+ Vd = get (d, :Vd , 0 )
22652270 wulff && (schmidt = false ) # Wulff stereonet
22662271
2267- Dv, Dp = _stereonet (mat)
2272+ Dv, Dp = stereonet_data (mat)
22682273 prj = schmidt ? :laea : (name= :stereo , center= [0 ,0 ])# "S0/0/15c"
22692274 (is_in_dict (d, [:lc :linecolor ]) === nothing ) && (d[:lc ] = " red" )
22702275 (is_in_dict (d, [:lt :linethickness ]) === nothing ) && (d[:lt ] = 0.5 )
22712276 d[:par ] = (MAP_GRID_PEN_PRIMARY= " 0.25,gray" , MAP_GRID_PEN_SECONDARY= " 0.25,black" )
22722277 d[:B ], d[:R ], d[:J ] = " pg5 sg20" , :d , prj
22732278 common_plot_xyz (" " , Dv, " plot" , first, false , d) # Plot the fault planes
2279+ (Vd != 0 ) && (d[:Vd ] = Vd)
22742280
22752281 (is_in_dict (d, [:marker :Marker :shape ]) === nothing ) && (d[:marker ] = " circ" )
22762282 (is_in_dict (d, [:mec :markeredgecolor :MarkerEdgeColor ]) === nothing ) && (d[:mec ] = " 0.0p,black" )
22772283 (is_in_dict (d, [:mc :markercolor ]) === nothing ) && (d[:mc ] = " blue" )
22782284 (is_in_dict (d, [:ms :markersize :MarkerSize :size ]) === nothing ) && (d[:ms ] = " 3p" )
22792285 common_plot_xyz (" " , Dp, " stereonet" , false , false , d) # Plot the poles
2280- basemap! (J= " P" * CTRL. pocket_J[2 ] * " +a" , B= " a15" , show= show)
2286+ basemap! (J= " P" * CTRL. pocket_J[2 ] * " +a" , B= " a15" , show= show, savefig = savefig )
22812287end
22822288stereonet! (mat:: AbstractArray{T,2} ; schmidt= true , wulff= false , kw... ) where T<: Real =
22832289 stereonet (mat; first= false , schmidt= schmidt, wulff= wulff, kw... )
22842290
2285- function _stereonet (mat:: AbstractArray{T,2} ) where T<: Real
2291+ function stereonet_data (mat:: AbstractArray{T,2} ) where T<: Real
22862292 # This function computes the fault planes and the poles. Returns a vector of GMTdataset
22872293 # with the fault planes and a GMTdataset with the poles.
22882294 @assert size (mat,2 ) >= 2 " Input matrix must have at least two columns: azimuth and plunge"
0 commit comments