Add the HEATMAP line style.#1511
Conversation
Add the HeatmapDef class used to configure heatmaps globaly for a graph. Add a palette option to the LineDef class for use by heatmaps. Parse the HeatmapDef in Grapher.scala and pass it to the Axis and then PlotDef. Throw an exception if a user attempts to plot a heatmap and stacked lines on the same axis. Select a color or palette for use in heatmaps in Grapher.scala. If no style or heatmap settings are provided, the heatmap grabs a color based on the order of the expression and uses alpha transparencies for the color scale. Remaining expressions use the rest of the palette as normal. If the user specifies a color for the expression, that color is used with alphas and no colors are taken from the main palette. If a palette is specified for heatmaps, that palette is used for the color scale.
brharrington
left a comment
There was a problem hiding this comment.
Added a few questions after a first pass, will take a closer look in a bit.
| ) | ||
| ) { | ||
| throw new IllegalArgumentException( | ||
| "Mixing STACK and HEATMAP line styles on the same axis is not allowed." |
There was a problem hiding this comment.
Throw an exception if a user attempts to plot a heatmap and stacked lines on the same axis.
What is the rationale for this? While I would agree it is not generally going to be useful, I don't really see a reason to prohibit that combination.
There was a problem hiding this comment.
For the percentile heatmap, I created a new ValueAxis type. If stacking is involved, the calculations pollute a lot of the heatmap logic (along with the axis) and I figured it wasn't worth it to support an op that could easily wind up completely obscuring the map. And if someone accidentally tried to plot percentiles or something else they wanted to line up with the map, it wouldn't so they'd be more confused. I think it's best to just ask the user to modify their query in that case.
|
Incorporated as part of #1547. |
Add the HeatmapDef class used to configure heatmaps globaly for a graph. Add a palette option to the LineDef class for use by heatmaps. Parse the HeatmapDef in Grapher.scala and pass it to the Axis and then PlotDef.
Throw an exception if a user attempts to plot a heatmap and stacked lines on the same axis.
Select a color or palette for use in heatmaps in Grapher.scala. If no style or heatmap settings are provided, the heatmap grabs a color based on the order of the expression and uses alpha transparencies for the color scale. Remaining expressions use the rest of the palette as normal. If the user specifies a color for the expression, that color is used with alphas and no colors are taken from the main palette. If a palette is specified for heatmaps, that palette is used for the color scale.