Merge pull request #1253 from romainFr/pull-request/c01d8199
Plotly : always define range explicitely. Solves axis linking #1124
This commit is contained in:
commit
299e9a85f2
@ -252,7 +252,9 @@ function plotly_axis(axis::Axis, sp::Subplot)
|
||||
end
|
||||
|
||||
ax[:tickangle] = -axis[:rotation]
|
||||
|
||||
lims = axis_limits(axis)
|
||||
ax[:range] = map(scalefunc(axis[:scale]), lims)
|
||||
|
||||
if !(axis[:ticks] in (nothing, :none))
|
||||
ax[:titlefont] = plotly_font(axis[:guidefont], axis[:foreground_color_guide])
|
||||
ax[:type] = plotly_scale(axis[:scale])
|
||||
@ -260,12 +262,6 @@ function plotly_axis(axis::Axis, sp::Subplot)
|
||||
ax[:tickcolor] = framestyle in (:zerolines, :grid) || !axis[:showaxis] ? rgba_string(invisible()) : rgb_string(axis[:foreground_color_axis])
|
||||
ax[:linecolor] = rgba_string(axis[:foreground_color_axis])
|
||||
|
||||
# lims
|
||||
lims = axis[:lims]
|
||||
if lims != :auto && limsType(lims) == :limits
|
||||
ax[:range] = map(scalefunc(axis[:scale]), lims)
|
||||
end
|
||||
|
||||
# flip
|
||||
if axis[:flip]
|
||||
ax[:autorange] = "reversed"
|
||||
@ -288,6 +284,7 @@ function plotly_axis(axis::Axis, sp::Subplot)
|
||||
ax[:showgrid] = false
|
||||
end
|
||||
|
||||
|
||||
ax
|
||||
end
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user