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

Autoscaling has fundamental problems #7413

Closed
Assignees
tacaswell
Labels
Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesPerformance
Milestone
@efiring

Description

@efiring

#6915 brings to light two problems with autoscaling:

  1. It looks very inefficient: every plotting method in_axes adds an artist to the axes and then callsautoscale_view, occasionally with arguments.autoscale_view then does a complete autoscaling operation, going through all of the artists that have been added up to that point. Logically, it seems like the autoscaling should be done only before a draw operation, not every time an artist is added.

  2. Beyond the apparent inefficiency, it doesn't work right for collections.add_collection callsself.update_datalim(collection.get_datalim(self.transData)) to get dataLim. This uses thepresenttransData to calculate the size indata units of objects that have sizes and/or positions that may be specified inscreen oraxes units. Then the subsequent call toautoscale_view uses those positions to modify the view limits. But this changestransData so that the intended result cannot be achieved--when drawn, the sizes and locations in data units will not be what they were calculated to be when the view limits were set. The mismatch will grow as additional artists are added, each one potentially changing the data limits and the view limits. Usually we get away with this with no one noticing, but not always.plt.yscale('log') after plt.scatter() behaves unpredictably in this example. #6915 shows that subsequently changing the scale of an axis, e.g. linear to log, can wreck the plot.

Metadata

Metadata

Assignees

Labels

Difficulty: Hardhttps://matplotlib.org/devdocs/devel/contribute.html#good-first-issuesPerformance

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp