GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — FIX: Accept precomputed responses in gangof4_plot by huxiaoyi-ovo · Pull Request #1261 · python-control/python-control

Conversation

@huxiaoyi-ovo

@huxiaoyi-ovo huxiaoyi-ovo commented Oct 27, 2026

Copy link
Copy Markdown

Summary

Fixes two issues with gangof4_plot(response) when passing a precomputed Gang of Four response.

  • The default Hz=False was incorrectly treated as a frequency override, causing the call to raise ValueError.
  • Plotting options were passed as a positional dictionary instead of keyword arguments.

The fix preserves the existing plant/controller call path and keeps frequency overrides invalid for precomputed responses.

Tests

Added regression tests for:

  • Plotting a precomputed response in the expected 2×2 layout.
  • Forwarding plotting options such as dB=True.
  • Accepting Hz=False while rejecting frequency overrides (omega, omega_limits, omega_num, and Hz=True).

Ruff passed. Additional CI checks are running in [fork PR #2](huxiaoyi-ovo#2).

AI assistance: ChatGPT (GPT-6) helped identify the issue, prepare the fix, and add regression tests.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
huxiaoyi-ovo added 2 commits October 27, 2026 05:16
@huxiaoyi-ovo
fix(freqplot): accept precomputed gang-of-four responses
8644bd2
@huxiaoyi-ovo
test(freqplot): cover precomputed gang-of-four plots and options
5319822
@huxiaoyi-ovo
huxiaoyi-ovo marked this pull request as ready for review October 27, 2026 09:52
@slivingston

slivingston commented Oct 27, 2026

Copy link
Copy Markdown
Member

@huxiaoyi-ovo Can you open an issue first to get agreement that the issues are real? You wrote

ChatGPT (GPT-6) helped identify the issue

so I guess it is not a real issue you encountered but one proposed by a chat bot...
Anyway, open an issue first.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@slivingston slivingston closed this Oct 27, 2026
@huxiaoyi-ovo huxiaoyi-ovo mentioned this pull request Oct 28, 2026
gangof4_plot(response) rejects precomputed responses with default options #1264
Open
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@huxiaoyi-ovo @slivingston
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.