Closed abought closed 4 years ago
Jason has indicated that he would be ok with a linear scale on the axis, which can be accomplished with existing code.
To make it easier to render this way (without modifying the data from the server), I've implemented a log10 template filter.
It may be used by modifying the default panel.y_axis.field
section to look like the following:
y_axis: {
axis: 1,
field: '{{namespace[assoc]}}log_pvalue|log10', // Bad field name. The api actually sends back -log10, so this really means "log10( -log10 (p))"
// floor: 0,
upper_buffer: 0.10,
// min_extent: [0, 10],
}
And adjusting the axes label to reflect the data:
association_panel_layout.axes.y1.label = 'log(-log10 (p))';
Note that log(log)
is not guaranteed to be positive! Negative values will result for any pvalue > 0.1. Setting min_extent
and floor
would have the effect of clipping out non-significant hits from the view- the example above is tweaked to show everything.
I tested on a regular association scatter plot to see the effect of various extreme values:
Required transform functions and docs merged and delivered. Closing this ticket but let me know if further work is required here.
Request from the T2D Portal team:
This would consist of a new axis scale layout directive (
scaleLog
). We should also investigate whetherdisplay_options
supports the new directive, to allow for users to switch between the axis scale dynamically. Otherwise, external widgets would need to mutate the layout and re-render manually.Configuration would be at the panel level; we'd need to give some thought to the interaction between stacked datalayers.