deephaven-core icon indicating copy to clipboard operation
deephaven-core copied to clipboard

`min`/`max` arguments in `x_axis` and `y_axis` methods not limiting scope of XY series plot

Open jjbrosnan opened this issue 1 year ago • 3 comments

Description

deephaven.plot.figure.Figure.x_axis and deephaven.plot.figure.Figure.y_axis have arguments, min and max, that should limit the span of the X/Y axes in a figure. They don't work as expected.

Steps to reproduce

from deephaven.plot.figure import Figure
from deephaven import empty_table

data = empty_table(1000).update(["X = 0.1 * ii", "Y = 25 * sin(X)"])

plot_xbounds = Figure().plot_xy(series_name="Sine wave", t=data, x="X", y="Y").x_axis(t=data, min=-20.0, max=-20.0).show()
plot_ybounds = Figure().plot_xy(series_name="Sine wave", t=data, x="X", y="Y").y_axis(t=data, min=-20.0, max=20.0).show()

Expected results

plot_xbounds to display X values from -20 to 20, or the minimum value in the table to 20. plot_ybounds to display Y values from -20 to 20, cutting the top and bottom of the waves out of view.

Actual results

Plots that look the same as if x_axis and y_axis weren't called at all.

A clear and concise description of what actually happened.

Additional details and attachments

If applicable, add any additional screenshots, logs, or other attachments to help explain your problem.

Versions

  • Deephaven: 0.33.0
  • OS: OS X
  • Browser: Chrome
  • Docker: 20.10.13

jjbrosnan avatar Mar 02 '24 13:03 jjbrosnan

It looks like this is exposed via the JS API on the dh.plot.Axis instance as minRange and maxRange, but at a glance I can't confirm that the web UI is consuming those values. @mofojed can you confirm one way or the other?

niloc132 avatar Mar 04 '24 16:03 niloc132

@niloc132 doesn't look like we read minRange or maxRange anywhere

mofojed avatar Mar 04 '24 20:03 mofojed

@mofojed should we move this to web-client-ui, or is there a reason to keep it here (or a dup)?

niloc132 avatar Aug 09 '24 13:08 niloc132