8000 sgrid() and zgrid() call matplotlib.pyplot.figure() · Issue #291 · python-control/python-control · GitHub
[go: up one dir, main page]

Skip to content
sgrid() and zgrid() call matplotlib.pyplot.figure() #291
Closed
@murrayrm

Description

@murrayrm

While debugging some code I noticed that examples/pvtol-nested.py was producing a blank figure instead of a pole-zero map that was expected. I chased this down tto the fact that the sgrid() function calls matplotlib.pyplot.figure(). This is in contrast to all other plotting routines and the consequence is that you get a new set of axes. This causes the following code (from examples/pvtol-nested.py) not to work as expected:

figure(10); clf();
(P, Z) = pzmap(T, Plot=True)
print("Closed loop poles and zeros: ", P, Z)

# Gang of Four
figure(11); clf();
gangof4(Hi*Po, Co);

Figure 10, which should have the output of pzmap will be blank since pzmap calls figure() (through sgrid) and creates a new set of axis (figure #11). Figure #11 will then get erased (away goes the pole/zero map) and be replace by the Gang of 4.

Metadata

Metadata

Assignees

No one assigned

    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

      0