Class Line¶
- Defined in File scatter.h
Class Documentation¶
-
class
Line
¶ Class for managing and serialising properties of a line or lines.
Public Functions
-
void
setColor
(const std::string &value)¶ set solid line colour as a string.
TODO Implement colour scaled values
See https://plot.ly/ipython-notebooks/color-scales/#6-colors for an example of different colour scales and values available
For reference, plotly’s default colours are: [ ‘#1f77b4’, # muted blue ‘#ff7f0e’, # safety orange ‘#2ca02c’, # cooked asparagus green ‘#d62728’, # brick red ‘#9467bd’, # muted purple ‘#8c564b’, # chestnut brown ‘#e377c2’, # raspberry yogurt pink ‘#7f7f7f’, # middle gray ‘#bcbd22’, # curry yellow-green ‘#17becf’ # blue-teal ]
- Parameters
value
: std::string plotly colour value, e.g. setColor(“#1f77b4”)
-
void
setDash
(const std::string &value)¶ set the line dash mode.
Accepts “solid”, “dot”, “dash”, “longdash”, “dashdot”, or “longdashdot” as dash_type input
- Parameters
value
: std::string The dash type to use
-
void
setWidth
(const int value)¶ set the line width in pixels.
- Parameters
value
: int the width in pixels for the line
-
bool
empty
() const¶ return boolean, false if any line properties are changed from default.
Friends
-
void
to_json
(nlohmann::json &j, const Line &p)¶ Serialise line data into a valid json string.
-
void