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

bodeplot does not work well with plotlyjs backend #875

Closed
fibonatic opened this issue Sep 19, 2023 · 5 comments
Closed

bodeplot does not work well with plotlyjs backend #875

fibonatic opened this issue Sep 19, 2023 · 5 comments

Comments

@fibonatic
Copy link

I am using Julia 1.9.3, ControlSystems v1.8.0 and Plots v1.39.0. The Bode plots are wrong when using the plotlyjs backend.

I used the following code the obtain the attached image:

using ControlSystems, Plots
plotlyjs()
bodeplot(tf(1,[1,0.5,1]))

Untitled

@fibonatic
Copy link
Author

I am able to recreate the same incorrect plot in Julia 1.8.5, ControlSystems v1.7.2 and Plots v1.38.10.

@baggepinnen
Copy link
Member

strange, the plot appears fine here (except for some ugliness in the tick labels) with the same versions of CS and Plots
image

how does it look with other plotting backends?

@fibonatic
Copy link
Author

I have tested a couple of different backends (GR, Plotly, PGFPlotsX, UnicodePlots and InspectDR) and all seem to be working OK. I also tried to remove and reinstall Plots, which did not change the plot result when using PlotslyJS. Then I also removed and reinstall PlotslyJS, which did not change the plot result.

@fibonatic
Copy link
Author

FYI: the figure does look OK when only plotting the magnitude, so using: bodeplot(tf(1,[1,0.5,1]), plotphase=false)

@baggepinnen
Copy link
Member

Hmm, I don't think there's anything we can do here then, it must be a bug in either PlotlyJS or the backend code to glue it together with Plots.jl

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants