Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect axes when deephaven.ui wraps legacy plot #622

Open
jnumainville opened this issue Jul 11, 2024 · 0 comments
Open

Incorrect axes when deephaven.ui wraps legacy plot #622

jnumainville opened this issue Jul 11, 2024 · 0 comments
Labels
bug Something isn't working
Milestone

Comments

@jnumainville
Copy link
Collaborator

Description

In the provided code, the axes on the "double" plot seem to get mixed up

Steps to reproduce

from deephaven import read_csv
from deephaven.plot.figure import Figure

source = read_csv(
    "https://media.githubusercontent.com/media/deephaven/examples/main/MetricCentury/csv/metriccentury.csv"
)

@ui.component
def dashboard():
    type, set_type = ui.use_state("single")
    return [
        ui.panel(
            ui.button("Plot Single", on_press=lambda: set_type("single")),
            ui.button("Plot Double", on_press=lambda: set_type("double"))
        ),
        ui.panel(
            Figure().plot_xy(series_name="Altitude", t=source, x="Time", y="AltitudeMeters").show()
        ) if type == "single" else
        ui.panel(
            Figure().plot_xy(series_name="Altitude", t=source, x="Time", y="AltitudeMeters").x_twin().plot_xy(series_name="Speed", t=source, x="Time", y="SpeedKPH").show()
        )
    ]

dash = dashboard()

Expected results

The axes output the same as if the plot is standalone

Figure().plot_xy(series_name="Altitude", t=source, x="Time", y="AltitudeMeters").x_twin().plot_xy(series_name="Speed", t=source, x="Time", y="SpeedKPH").show()

Actual results

The axes are mixed up

@jnumainville jnumainville added bug Something isn't working triage labels Jul 11, 2024
@vbabich vbabich added this to the Backlog milestone Jul 16, 2024
@vbabich vbabich removed the triage label Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants