kandy
 
0.8.0
Because kandy 0.8.0 is still in development, this documentation may not be entirely accurate and is subject to change.

Series Hack

Edit pageLast modified: 07 December 2023

Sometimes you have several sources of data, and you want to visualize them by displaying color mapping from a group (i.e., color of plot objects corresponds to their group).

Let's assume we have three samples with different y-values and the same x-values

So you can try something like that:

Guide series hack lines plot

But unfortunately, "lets-plot" doesn't support it — legend is not displayed (because of Lets-Plot limitations). So you need to gather them into one layer. You need to change your data - add grouping variable (so now each point has exactly three parameters: x and y coordinates and its group).

Guide series hack gathered lines