Reputation: 987
In this simplified example, we alter the style
of a plot function.
plot(Something, "SomethingWePlot", color=colorful, linewidth = 1, style = BooleanVariable ? plot.style_line : plot.style_cross)
We can do it with its color but if I want the same for the line style then the following error message appears: Cannot call 'operator ?:' with argument 'expr0'='BooleanVariable'. An argument of 'series bool' type was used but a 'input bool' is expected
Same happens when I want to alter the linewidth
value by a Boolean variable:
plot(Something, "SomethingWePlot", color=colorful, linewidth = BooleanVariable ? 3 : 1, style = plot.style_cross)
Error message in this case: Cannot call 'plot' with argument 'linewidth'='call 'operator ?:' (series int)'. An argument of 'series int' type was used but a 'input int' is expected
How to do it the right way? There's an old workaround here but according to my knowledge, that consumes 2 plots of the 64 (limit) and I'm already near the limit thanks to a bunch of plotchars and labels.
Upvotes: 0
Views: 180
Reputation: 3803
The workaround is the only way as the linewidth and style arguments are required to be known at compilation as constants/input variables and can't be modified during script execution.
If you really cant do without the additional plots, you can achieve a workaround by separating the required plots into multiple sets/scripts, each displaying a portion of the total required plots. Then applying them to the chart and moving them to occupy the same pane and sharing the same scale so that they overlay each other.
Upvotes: 1