recipe fix; plotly fixes
This commit is contained in:
parent
939295ab04
commit
2a60a929f1
@ -82,7 +82,7 @@ end
|
|||||||
function plotlyfont(font::Font)
|
function plotlyfont(font::Font)
|
||||||
Dict(
|
Dict(
|
||||||
:family => font.family,
|
:family => font.family,
|
||||||
:size => font.pointsize,
|
:size => round(Int, font.pointsize*1.4),
|
||||||
:color => webcolor(font.color),
|
:color => webcolor(font.color),
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
@ -106,7 +106,9 @@ function get_plot_json(plt::Plot{PlotlyPackage})
|
|||||||
d_out[:title] = d[:title]
|
d_out[:title] = d[:title]
|
||||||
d_out[:titlefont] = plotlyfont(d[:guidefont])
|
d_out[:titlefont] = plotlyfont(d[:guidefont])
|
||||||
# d_out[:width], d_out[:height] = d[:size]
|
# d_out[:width], d_out[:height] = d[:size]
|
||||||
d_out[:margin] = Dict(:l=>30, :b=>30, :r=>15, :t=>15)
|
d_out[:margin] = Dict(:l=>35, :b=>30, :r=>8, :t=>20)
|
||||||
|
# d_out[:margin] = Dict(:l=>1, :b=>1, :r=>1, :t=>1)
|
||||||
|
# d_out[:margin] = Dict(:autoexpand=>true)
|
||||||
# d_out[:margin] = Dict(:t=>20)
|
# d_out[:margin] = Dict(:t=>20)
|
||||||
d_out[:paper_bgcolor] = bgcolor
|
d_out[:paper_bgcolor] = bgcolor
|
||||||
d_out[:plot_bgcolor] = bgcolor
|
d_out[:plot_bgcolor] = bgcolor
|
||||||
@ -122,6 +124,7 @@ function get_plot_json(plt::Plot{PlotlyPackage})
|
|||||||
:tickcolor => fgcolor,
|
:tickcolor => fgcolor,
|
||||||
:linecolor => fgcolor,
|
:linecolor => fgcolor,
|
||||||
:showgrid => d[:grid],
|
:showgrid => d[:grid],
|
||||||
|
:zeroline => false,
|
||||||
)
|
)
|
||||||
d_out[:yaxis] = Dict(
|
d_out[:yaxis] = Dict(
|
||||||
:title => d[:ylabel],
|
:title => d[:ylabel],
|
||||||
@ -131,6 +134,7 @@ function get_plot_json(plt::Plot{PlotlyPackage})
|
|||||||
:tickcolor => fgcolor,
|
:tickcolor => fgcolor,
|
||||||
:linecolor => fgcolor,
|
:linecolor => fgcolor,
|
||||||
:showgrid => d[:grid],
|
:showgrid => d[:grid],
|
||||||
|
:zeroline => false,
|
||||||
)
|
)
|
||||||
|
|
||||||
d_out[:showlegend] = d[:legend]
|
d_out[:showlegend] = d[:legend]
|
||||||
|
|||||||
@ -17,7 +17,7 @@ plot!(plt::Plot, recipe::PlotRecipe, args...; kw...) = plot!(getRecipeXY(recipe)
|
|||||||
num_series(x::AMat) = size(x,2)
|
num_series(x::AMat) = size(x,2)
|
||||||
num_series(x) = 1
|
num_series(x) = 1
|
||||||
|
|
||||||
_apply_recipe(d::Dict; kw...) = nothing
|
_apply_recipe(d::Dict; kw...) = ()
|
||||||
|
|
||||||
# if it's not a recipe, just do nothing and return the args
|
# if it's not a recipe, just do nothing and return the args
|
||||||
function _apply_recipe(d::Dict, args...; issubplot=false, kw...)
|
function _apply_recipe(d::Dict, args...; issubplot=false, kw...)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user