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,6 +252,8 @@ function plotly_axis(axis::Axis, sp::Subplot)
|
|||||||
end
|
end
|
||||||
|
|
||||||
ax[:tickangle] = -axis[:rotation]
|
ax[:tickangle] = -axis[:rotation]
|
||||||
|
lims = axis_limits(axis)
|
||||||
|
ax[:range] = map(scalefunc(axis[:scale]), lims)
|
||||||
|
|
||||||
if !(axis[:ticks] in (nothing, :none))
|
if !(axis[:ticks] in (nothing, :none))
|
||||||
ax[:titlefont] = plotly_font(axis[:guidefont], axis[:foreground_color_guide])
|
ax[:titlefont] = plotly_font(axis[:guidefont], axis[:foreground_color_guide])
|
||||||
@ -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[:tickcolor] = framestyle in (:zerolines, :grid) || !axis[:showaxis] ? rgba_string(invisible()) : rgb_string(axis[:foreground_color_axis])
|
||||||
ax[:linecolor] = rgba_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
|
# flip
|
||||||
if axis[:flip]
|
if axis[:flip]
|
||||||
ax[:autorange] = "reversed"
|
ax[:autorange] = "reversed"
|
||||||
@ -288,6 +284,7 @@ function plotly_axis(axis::Axis, sp::Subplot)
|
|||||||
ax[:showgrid] = false
|
ax[:showgrid] = false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
ax
|
ax
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user