You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When getting mouse event on ui.output_plot(), e.g., click, brush, etc., the input value accessed in the server does not correctly represents user's input on a plot.
For example, a snapshot below shows that I dragged a region for [2, 3] on x-axis and [20, 30] on y-axis, but the input values were read as [1.7, 2.9] for x-axis and [21.9, 30.6] for y-axis.
Below is an app code:
from shiny import App, render, ui, req
from plotnine import ggplot, aes, geom_point
from pydataset import data
mtcars = data("mtcars")
app_ui = ui.page_fluid(
ui.output_plot("plot", brush=True),
ui.output_text_verbatim("info"),
)
def server(input, output, session):
@render.plot
def plot():
res = (ggplot(mtcars, aes('wt', 'mpg'))
+ geom_point())
return res
@render.text
def info():
req(input.plot_brush())
return input.plot_brush()
app = App(app_ui, server)
The text was updated successfully, but these errors were encountered:
jcheng5
changed the title
Incorrect input values of mouse event position with {plotline}
Incorrect input values of mouse event position with {plotnine}Jan 16, 2024
When getting mouse event on
ui.output_plot()
, e.g.,click
,brush
, etc., the input value accessed in the server does not correctly represents user's input on a plot.For example, a snapshot below shows that I dragged a region for
[2, 3]
on x-axis and[20, 30]
on y-axis, but the input values were read as[1.7, 2.9]
for x-axis and[21.9, 30.6]
for y-axis.Below is an app code:
The text was updated successfully, but these errors were encountered: