@@ -55,11 +55,11 @@ function _analemma(lon, lat, year, hour, cmap, lonlat::Bool, data::Bool, d)
5555 D = mat2ds (ana)
5656 data && (D. colnames = cnames; return D)
5757
58- do_show = ((val = find_in_dict (d, [ :show ])[ 1 ]) === nothing ) ? true : false # Default is to show
58+ do_show, fmt, savefig = get_show_fmt_savefig (d, true ) # Default is to show
5959 C = makecpt (cmap= cmap, range= (1 , n_days))
6060 plot (D, marker= " c" , markersize= " 4p" , cmap= C, zcolor= collect (1 : n_days), colorbar= (xlabel= " Day of year" ,),
6161 xlabel= lonlat ? " Longitude" : " Azimuth" , ylabel= lonlat ? " Latitude" : " Elevation" ,
62- title= @sprintf (" Analemma %02d:00 lat=%.1f" , floor (Int, hour), lat), show= do_show, d... )
62+ title= @sprintf (" Analemma %02d:00 lat=%.1f" , floor (Int, hour), lat), fmt = fmt, savefig = savefig, show= do_show, d... )
6363end
6464
6565# ---------------------------------------------------------------------------------------------------
@@ -138,9 +138,7 @@ function _sunsetrise(lon, lat, year::Int, TZ::Int, raise::Bool, both::Bool, data
138138 yaxis_nt = (annot= 15 , annot_unit= :minute2 , ticks= 5 , ticks_unit= :minute2 , label= y_label)
139139 par = (FORMAT_DATE_MAP= " o" , FORMAT_TIME_PRIMARY_MAP= " abbreviated" )
140140
141- do_show = ((val = find_in_dict (d, [:show ])[1 ]) === nothing ) ? true : false # Default is to show
142- fmt:: String = ((val = find_in_dict (d, [:fmt ])[1 ]) != = nothing ) ? arg2str (val):: String : FMT[]:: String
143- savefig = ((val = find_in_dict (d, [:savefig :figname :name ])[1 ]) != = nothing ) ? arg2str (val):: String : nothing
141+ do_show, fmt, savefig = get_show_fmt_savefig (d, true ) # Default is to show
144142 opt_R = ((val = find_in_dict (d, [:R :region :limits ])[1 ]) != = nothing ) ? val : " tightx"
145143 both ? plotyy (Dsr, Dss, yaxis= yaxis_nt, title= title, conf= par, R= opt_R, lw= 1 ; d... ) :
146144 plot (Dsun, xaxis= xaxis_nt, yaxis= yaxis_nt, title= title, lc= " #0072BD" , lw= " 1p" , conf= par, R= opt_R; d... )
0 commit comments