Plotly always renders in Viewer and ignores preference
When the preference to show HTML plots in the Viewer is disabled, rendering a Plotly plot shows up in the Viewer.
import plotly.express as px
fig = px.bar(x=["a", "b", "c"], y=[1, 3, 2])
fig
Positron only checks the function call to show() in order to display the plot in the Plots view. We should allow calling fig to also show in the Plots view. We can relax the check on the call stack to the Plotly module.
@timtmok , despite toggling
Interactive Plots in Viewerit appears the plot is always rendering in theviewerand never inplots. I tried running against build2024.10.0-13and2024.11.0-3and both exhibited this behavior.https://github.com/user-attachments/assets/317713f0-23d4-4bd4-a4b7-01fbf76011e1
Originally posted by @midleman in #4245
For verification, we should also check that Vetiver apps preview in the viewer pane. Code:
from vetiver import VetiverModel, VetiverAPI
from vetiver.data import mtcars
from sklearn.linear_model import LinearRegression
model = LinearRegression().fit(mtcars.drop(columns="mpg"), mtcars["mpg"])
v = VetiverModel(model, model_name = "cars_linear", prototype_data = mtcars.drop(columns="mpg"))
VetiverAPI(v).run()
Verified Fixed
Positron Version(s) : 2024.11.0-60
OS Version : OSX
Test scenario(s)
Setting is honored now and vetiver works as expected
Link(s) to TestRail test cases run or created: