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 not showing plot after 10^2 #787

Closed
naeem6100 opened this issue Dec 24, 2022 · 5 comments
Closed

bodeplot not showing plot after 10^2 #787

naeem6100 opened this issue Dec 24, 2022 · 5 comments

Comments

@naeem6100
Copy link

naeem6100 commented Dec 24, 2022

ControlSystems v1.5.3

using ControlSystems
setPlotScale("dB")
sysc1 = tf(1000000000,[47,0])
fig= bodeplot(sysc1, plotphase=true,label="Capacitor-1",xlims=(1, 10^4),ylims=(-150, 150))

problem

@naeem6100 naeem6100 changed the title bodeplot showing nothing after 10^2 bodeplot not showing plot after 10^2 Dec 24, 2022
@baggepinnen
Copy link
Member

That looks like an issue with Plots.jl or GR, have you tried plotting with plotly as backend?

@naeem6100
Copy link
Author

naeem6100 commented Dec 25, 2022

That looks like an issue with Plots.jl or GR, have you tried plotting with plotly as backend?

I have plotted "using Plots" with gr()

using ControlSystems
using Plots
gr()
setPlotScale("dB")
sysc1 = tf(1000000000,[47,0])
fig= bodeplot(sysc1, plotphase=true,label="Capacitor-1",xlims=(1, 10^4),ylims=(-150, 150))

Running this code in google colab using "Julia Colab Notebook Template"
https://colab.research.google.com/github/ageron/julia_notebooks/blob/master/Julia_Colab_Notebook_Template.ipynb

how to use plotly as backend?

@baggepinnen
Copy link
Member

Install Plotly.jl and then call plotly()

@albheim
Copy link
Member

albheim commented Dec 25, 2022

Isn't it just that you change xlims without increasing the frequency range? I think there is a w keyword for bodeplot allowing you to do that, though not at a computer now so haven't tried.

@naeem6100
Copy link
Author

naeem6100 commented Dec 25, 2022

Isn't it just that you change xlims without increasing the frequency range? I think there is a w keyword for bodeplot allowing you to do that, though not at a computer now so haven't tried.

so it is applying default frequency vector by calling _default_freq_vector which is using default range from 10^0 to 10^2
Thanks!

following code is doing the job.

using ControlSystems
using Plots
gr()
setPlotScale("dB")
nw = 60*(7)
# frequency vector
fv= exp10.(range(0, stop=7, length=nw))
sysc1 = tf(100000000,[47,0])
fig= bodeplot(sysc1, plotphase=false,fv,label="Capacitor-1",xlims=(1, 10^7),ylims=(-150, 150))

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

3 participants