Thanks for reading and please see below for a MWE parcoords()
with the Plotly backend.
This MWE generates no errors.
background
I just need a parallel coordinates plot. In general, I prefer the gr()
or pyplot()
backends but couldn’t find any examples for these, so I chose PlotlyJS based on the example in this previous answer. So I’m grateful for any working example of this figure, regardless of the backend.
question:
How can I fix the following:
- attempt to set the font size of the ticks and axis labels (via variables
xts
,yts
,ygs
) is not working - attempt to set the line weight (via variable
lw
) is not working
code
using Plots, PlotlyJS, DataFrames
n = 100
lw = 20
xts = 20
yts = 20
ygs = 20
df = DataFrame(group=rand(1:3,n), response1 = rand(n), response2 = rand(n), response3=rand(n), response4=rand(n));
df.score23 = df.response2.*df.response3
mytrace = parcoords(;line = attr(color=df.score23),
dimensions = [
attr(range = [0,1],
label = "response1", values = df.response1),
attr(range = [0,1],
label = "response2", values = df.response2),
attr(range = [0,1],
label = "response3", values = df.response3),
attr(range = [0,1],
label = "response4", values = df.response4)
]);
layout = Layout(Dict{Symbol,Any}(
:paper_bgcolor => "rgb(105, 105, 105)",
:plot_bgcolor => "rgb(105, 105, 105)",
:linewidth => lw,
:xtickfontsize => xts,
:ytickfontsize => yts,
:yguidefontsize => ygs))
myplot = PlotlyJS.plot(mytrace,layout)
PlotlyJS.savefig(myplot, "/tmp/parcoords.png")