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

Excessively large point size can cause long runtime when calling pyplot.savefig with vectorized format #17674

Open
@giganano

Description

@giganano

Bug report

Bug summary

I've stumbled across something that can arise when point sizes are excessively large, so the only few lines that matter are

ax.scatter(xcoords,ycoords,s=pointsizes,**kwargs)plt.savefig("figname.pdf")

The bug arose when an element of mypointsizes array was unintentionally over1e35. This would save a PNG figure, but caused it to take excessively long in saving a PDF that I thought the program had stalled. The point sizes were based on the median value of a set of masses, some of which were very near zero. When I filtered the data more strictly to remove these outliers, the point sizes were much more reasonable and the figure was produced as expected - that is, once thepointsizes array didn't have these excessively large values, the runtime was normal.

It may be useful to have a prescription for determining maximum allowed point sizes, or have a RuntimeWarning raised when point sizes are excessively large, if this isn't in the docs already.

Matplotlib version

  • Operating system: Mac OS X Catalina
  • Matplotlib version: 3.2.2
  • Matplotlib backend (print(matplotlib.get_backend())): TkAgg
  • Python version: 3.7.4
  • Jupyter version (if applicable): N/A
  • Other libraries: N/A

Matplotlib installed viapip

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


      [8]ページ先頭

      ©2009-2025 Movatter.jp