magland / sortingview

Web app for viewing results of ephys spike sorting
Apache License 2.0
23 stars 7 forks source link

position plot: provide optional min/max values so doesn't rescale with zoom #181

Open magland opened 2 years ago

magland commented 2 years ago

In this case of linearized position, we know the extent of the track ahead of time (min/max values). So those should be supported as inputs with the data. Those data items need to get propagated to the position plot as props. Automatic scaling should only occur if the min/max is not provided explicitly.

jsoules commented 2 years ago

So we'll probably need to add this to the underlying TimeSeriesView as well in order to support it for this application.

Do we need to make any alterations if the min/max window excludes some (or all) of the data in the time range?

I wonder if this also implies that we should draw labeled y-axes as well as x-axes.

jsoules commented 2 years ago

Upon reflection, I think you're really going to need a way to turn this on and off, or else use it very sparingly--it makes sense for the linearized position plot where the range is known and the values are fairly large, but in other cases just one outlier could render the entire plot illegible (even for plots where a fixed y-axis might otherwise be desirable).

I'm going to start with #184 (interpreted as "add a y-axis scale with tickmarks") and ponder this some more; but as of right now I think the more useful functionality will be a checkbox to allow the user to "fix" the current scale.