Skip to content

Separation of plotting from computation #65

Description

@moorepants

If a system is passed in, both the root locus and bode functions do both computations and produce a plot. In my opinion, it would be better to separate the computation from the plotting. The plotting commands should then return matplotlib axes and maybe figure instances and the computation methods would return the results of the computations, e.g. roots, mag/phase, etc.

Right now there aren't clean ways to get hold of the figure and axes (I don't consider .gca() and .gcf() that "clean"). And if you are using a plotting library other than matplotlib you may not want to call functions that create matplotlib plots.

There maybe other plotting functions in the library that I haven't play with yet too that this is applicable too.

Activity

  1. billtubbs commented on Aug 9, 2021

    @billtubbs
    Contributor

    I was thinking along the same lines. This would be more in line with other libraries like Pandas. I wrote a draft for how this might work here:

    Is this what you had in mind @moorepants ?

  2. bnavigator commented on Aug 10, 2021

    @bnavigator
    Contributor

    Great, let's discuss it in #645

  3. murrayrm commented on Dec 31, 2023

    @murrayrm
    Member

    This issue has been moved to #645.

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions