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

marginplot + setPlotScale("dB") = no magnitude plot #798

Closed
stephans3 opened this issue Jan 30, 2023 · 2 comments · Fixed by #799
Closed

marginplot + setPlotScale("dB") = no magnitude plot #798

stephans3 opened this issue Jan 30, 2023 · 2 comments · Fixed by #799

Comments

@stephans3
Copy link

Hi all,
I tried to use marginplot with setPlotScale("dB").

With log10 it works, but not with dB.

using ControlSystems, Plots

G = tf([100], [1, 5, 6, 5, 1])  # Example TF
marginplot(G) # This works

setPlotScale("dB")
marginplot(G) # Does not work

These warnings show up:

┌ Warning: No strict ticks found
└ @ PlotUtils ~/.julia/packages/PlotUtils/M092a/src/ticks.jl:191
┌ Warning: No strict ticks found
└ @ PlotUtils ~/.julia/packages/PlotUtils/M092a/src/ticks.jl:191

marginplot_setplotscale

@albheim
Copy link
Member

albheim commented Jan 30, 2023

Seems like a few spots in ControlSystemsBase/plotting.jl are not really using the internal _PlotScale**** variables. Might be enough to update this line


to use _PlotScaleFunc instead of :log10, but might also be more than that needed. And the label just next to that should probably also be updated to use _PlotScaleStr in some way as well.

Edit: Also this might change how at least bodeplot works? On the phone now so can't be bothered to look, but it might affect other things so maybe my suggested changes are not the way to go.

baggepinnen added a commit that referenced this issue Jan 31, 2023
baggepinnen added a commit that referenced this issue Jan 31, 2023
@baggepinnen
Copy link
Member

Hopefully fixed by

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

Successfully merging a pull request may close this issue.

3 participants