diff --git a/src/backends/plotly.jl b/src/backends/plotly.jl index 797c0245..7a9b889d 100644 --- a/src/backends/plotly.jl +++ b/src/backends/plotly.jl @@ -82,7 +82,7 @@ end function plotlyfont(font::Font) Dict( :family => font.family, - :size => font.pointsize, + :size => round(Int, font.pointsize*1.4), :color => webcolor(font.color), ) end @@ -106,7 +106,9 @@ function get_plot_json(plt::Plot{PlotlyPackage}) d_out[:title] = d[:title] d_out[:titlefont] = plotlyfont(d[:guidefont]) # 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[:paper_bgcolor] = bgcolor d_out[:plot_bgcolor] = bgcolor @@ -122,6 +124,7 @@ function get_plot_json(plt::Plot{PlotlyPackage}) :tickcolor => fgcolor, :linecolor => fgcolor, :showgrid => d[:grid], + :zeroline => false, ) d_out[:yaxis] = Dict( :title => d[:ylabel], @@ -131,6 +134,7 @@ function get_plot_json(plt::Plot{PlotlyPackage}) :tickcolor => fgcolor, :linecolor => fgcolor, :showgrid => d[:grid], + :zeroline => false, ) d_out[:showlegend] = d[:legend] diff --git a/src/recipes.jl b/src/recipes.jl index ff90dbe4..44ba5d85 100644 --- a/src/recipes.jl +++ b/src/recipes.jl @@ -17,7 +17,7 @@ plot!(plt::Plot, recipe::PlotRecipe, args...; kw...) = plot!(getRecipeXY(recipe) num_series(x::AMat) = size(x,2) 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 function _apply_recipe(d::Dict, args...; issubplot=false, kw...)