Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Doc]: Oscilloscope demo x-axis offset #24476

Closed
Milestone
@oscargus

Description

@oscargus

Documentation Link

https://matplotlib.org/devdocs/gallery/animation/strip_chart.html

Problem

The demo starts off by displaying the range 0 to 2, then 2 to 4 and so on, but after a while an offset is introduced, which I assume is unwanted. For example, the 20th updates goes to 40.25 (probably a bit more) rather than 40.

No big deal and probably just a one-off error (or a floating-point effect), but I was just about to point a colleague to this and realized that something was not as one could hope for.

Note that one will have to run it locally to see the effect. (The online version can probably be slightly improved though as it just starts redrawing before starting all over again.)

Suggested improvement

Fix the code so that it always increment the range by 2 (ort rather). One may think of skipping thedt and instead use number of points per display (t/dt).

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp