Skip to content

control.bode configured with omega_limits not showing minor ticks  #938

Description

@lpdx

Using omega_limits with 8 dacades we can make Bode plots successfully with both major and minor ticks.
But when increasing then omega_limits to 9 decades the minor ticks in xaxis are not plotted.

Library Version
control 0.9.4
matplotlib 3.7.2

Minimum working example:

import control
import matplotlib.pyplot as plt

omega_limits = [0.1,1000000]

G = control.tf(1,[1,5000])

plt.figure(figsize=[10,5])
control.bode(G,omega_limits=omega_limits, Hz=True)
plt.savefig('correct.png')
plt.show()

correct

When increasing the omega upper limit to 10000000 (one decade above) the ticks are missing:

import control
import matplotlib.pyplot as plt

omega_limits = [0.1,10000000]

G = control.tf(1,[1,5000])

plt.figure(figsize=[10,5])
control.bode(G,omega_limits=omega_limits, Hz=True)
plt.savefig('wrong.png')
plt.show()

wrong

Is this a bug or an undocumented limitation of the package?

I tried to force show minor ticks but it does not work.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Sponsor
    SponsoredKunjungi sekarang
    Promo