PlotLayout has no field coloraxis
as the doc string of PlotDataMarker says
`coloraxis::String` - Sets a reference to a shared color axis. References to these shared color axes are "coloraxis", "coloraxis2", "coloraxis3", etc. Settings for these shared color axes are set in the layout, under `layout.coloraxis`, `layout.coloraxis2`, etc. Note that multiple color scales can be linked to the same color axis.
however, when i write a PlotLayout like
const preview_layout = PlotLayout(
title = PlotLayoutTitle(text = "Densified Overlay preview", font = Font(24)),
showlegend = true,
grid = PlotLayoutGrid(rows = 1, columns = 2, pattern = "independent"),
xaxis = [PlotLayoutAxis(xy = "x", index = i, title = "x") for i = 1:2],
yaxis = [PlotLayoutAxis(xy = "y", index = i, title = "y") for i = 1:2],
coloraxis = [PlotLayoutAxis(xy = "z", index = i, title = "z") for i = 1:2]
)
the error message shows that
ERROR: type PlotLayout has no field coloraxis
Hi,
Thanks for reporting. Looks the problem here you are trying to assign an object of type Vector{PlotLayoutAxis} in coloraxis instead of string
I write the code as:
PlotData(
x = sort(unique(df.x)),
y = sort(unique(df.y)),
z = [res[i, :] for i = 1:size(res, 1)],
xaxis = "x$idx",
yaxis = "y$idx",
coloraxis = "z$idx",
name = name,
plot = StipplePlotly.Charts.PLOT_TYPE_HEATMAP,
)
In StipplePlotly/src/Charts.jl, the docstring of the PlotData coloraxis keyword argument is
Settings for these shared color axes are set in the layout, under
layout.coloraxis,layout.coloraxis2
however, i searched StipplePlotly/src/Layout.jl, and found no "coloraxis", this might be a not yet implemented feature in Layout.jl but referenced in Charts.jl
Hi @honghuzi thanks for posting the example, do you get the same result with PlotyBase?
https://github.com/GenieFramework/StippleDemos/blob/master/StipplePlotly/PlotlyBaseDemo.jl
Example of bar: https://github.com/GenieFramework/ScoringEngineApp/blob/4895c6b20b8bb4f7c63397c96539107d835178f1/models/scoringengine/explain.jl#L18
https://github.com/GenieFramework/ScoringEngineApp/blob/4895c6b20b8bb4f7c63397c96539107d835178f1/models/ScoringEngine.jl#L166
If you are aware of PlotyBase please give it a shot. Otherwise, I'll try on my end