commit
c4f79814df
1
REQUIRE
1
REQUIRE
@ -14,3 +14,4 @@ NaNMath
|
|||||||
Requires
|
Requires
|
||||||
Contour
|
Contour
|
||||||
GR 0.31.0
|
GR 0.31.0
|
||||||
|
Dates
|
||||||
|
|||||||
@ -6,6 +6,7 @@ using Reexport
|
|||||||
|
|
||||||
import StaticArrays
|
import StaticArrays
|
||||||
using StaticArrays.FixedSizeArrays
|
using StaticArrays.FixedSizeArrays
|
||||||
|
using Dates
|
||||||
|
|
||||||
@reexport using RecipesBase
|
@reexport using RecipesBase
|
||||||
import RecipesBase: plot, plot!, animate
|
import RecipesBase: plot, plot!, animate
|
||||||
|
|||||||
@ -413,15 +413,15 @@ function _hdf5plot_gwrite(grp, k::String, v::Surface)
|
|||||||
_hdf5plot_gwrite(grp, "data2d", v.surf)
|
_hdf5plot_gwrite(grp, "data2d", v.surf)
|
||||||
_hdf5plot_writetype(grp, Surface)
|
_hdf5plot_writetype(grp, Surface)
|
||||||
end
|
end
|
||||||
#TODO: "Properly" support Nullable using _hdf5plot_writetype?
|
# #TODO: "Properly" support Nullable using _hdf5plot_writetype?
|
||||||
function _hdf5plot_gwrite(grp, k::String, v::Nullable)
|
# function _hdf5plot_gwrite(grp, k::String, v::Nullable)
|
||||||
if isnull(v)
|
# if isnull(v)
|
||||||
_hdf5plot_gwrite(grp, k, nothing)
|
# _hdf5plot_gwrite(grp, k, nothing)
|
||||||
else
|
# else
|
||||||
_hdf5plot_gwrite(grp, k, v.value)
|
# _hdf5plot_gwrite(grp, k, v.value)
|
||||||
end
|
# end
|
||||||
return
|
# return
|
||||||
end
|
# end
|
||||||
|
|
||||||
function _hdf5plot_gwrite(grp, k::String, v::SeriesAnnotations)
|
function _hdf5plot_gwrite(grp, k::String, v::SeriesAnnotations)
|
||||||
#Currently no support for SeriesAnnotations
|
#Currently no support for SeriesAnnotations
|
||||||
|
|||||||
@ -438,16 +438,16 @@ end
|
|||||||
mutable struct SeriesAnnotations
|
mutable struct SeriesAnnotations
|
||||||
strs::AbstractVector # the labels/names
|
strs::AbstractVector # the labels/names
|
||||||
font::Font
|
font::Font
|
||||||
baseshape::Nullable
|
baseshape::Union{Shape, AbstractVector{Shape}, Nothing}
|
||||||
scalefactor::Tuple
|
scalefactor::Tuple
|
||||||
end
|
end
|
||||||
function series_annotations(strs::AbstractVector, args...)
|
function series_annotations(strs::AbstractVector, args...)
|
||||||
fnt = font()
|
fnt = font()
|
||||||
shp = Nullable{Any}()
|
shp = nothing
|
||||||
scalefactor = (1,1)
|
scalefactor = (1,1)
|
||||||
for arg in args
|
for arg in args
|
||||||
if isa(arg, Shape) || (isa(arg, AbstractVector) && eltype(arg) == Shape)
|
if isa(arg, Shape) || (isa(arg, AbstractVector) && eltype(arg) == Shape)
|
||||||
shp = Nullable(arg)
|
shp = arg
|
||||||
elseif isa(arg, Font)
|
elseif isa(arg, Font)
|
||||||
fnt = arg
|
fnt = arg
|
||||||
elseif isa(arg, Symbol) && haskey(_shapes, arg)
|
elseif isa(arg, Symbol) && haskey(_shapes, arg)
|
||||||
|
|||||||
@ -1,10 +1,10 @@
|
|||||||
|
|
||||||
mutable struct CurrentPlot
|
mutable struct CurrentPlot
|
||||||
nullableplot::Nullable{AbstractPlot}
|
nullableplot::Union{AbstractPlot, Nothing}
|
||||||
end
|
end
|
||||||
const CURRENT_PLOT = CurrentPlot(Nullable{AbstractPlot}())
|
const CURRENT_PLOT = CurrentPlot(nothing)
|
||||||
|
|
||||||
isplotnull() = isnull(CURRENT_PLOT.nullableplot)
|
isplotnull() = CURRENT_PLOT.nullableplot == nothing
|
||||||
|
|
||||||
"""
|
"""
|
||||||
current()
|
current()
|
||||||
@ -16,7 +16,7 @@ function current()
|
|||||||
end
|
end
|
||||||
get(CURRENT_PLOT.nullableplot)
|
get(CURRENT_PLOT.nullableplot)
|
||||||
end
|
end
|
||||||
current(plot::AbstractPlot) = (CURRENT_PLOT.nullableplot = Nullable(plot))
|
current(plot::AbstractPlot) = (CURRENT_PLOT.nullableplot = plot)
|
||||||
|
|
||||||
# ---------------------------------------------------------
|
# ---------------------------------------------------------
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user