Skip to content

Matplotlib is crashed over figersize=(288,16) and dpi = 500 #5455

Closed

Description

@TharinduKetipe

Currently I,m working on CPU consumption and memory consumption visualizing tool for large distributed system. There are so many processes running. Some times this will covers the processes of whole day and generates graphs. For the clearance of the graph I'm changing the width of the figure size according to the time rang. Height of the figure size is constant. Output is png and it's more like the structure of a ECG printout. But when the figure width passes the 288 (for dpi=500), python was giving segmentation fault and matplotlib was crashed. What is the maximum capacity of this library?

Activity

  1. changed the title [-]Matplotlib is crashed over figerzize=(288,16) and dpi = 500[/-] [+]Matplotlib is crashed over figersize=(288,16) and dpi = 500[/+] on Nov 10, 2015
  2. Tillsten commented on Nov 10, 2015

    @Tillsten
    Contributor

    You are properly out of memory, figure of this size uses at least 9 BG. Btw for this kind of question either stack-overflow or the mailing list are more appropriate.

  3. TharinduKetipe commented on Nov 10, 2015

    @TharinduKetipe
    Author

    Sorry. I thought it is an issue of the library. Because I was running this process on system which have 65GB RAM.

  4. WeatherGod commented on Nov 10, 2015

    @WeatherGod
    Member

    "system which have 65GB RAM"

    !?!

    Ok, important question. Are all 65GB of RAM accessible to any process, or
    is it a cluster of some sort that has a total of 65GB of RAM?

    On Tue, Nov 10, 2015 at 4:47 AM, Tharindu Ketipearachchi <
    notifications@github.com> wrote:

    Sorry. I thought it is an issue of the library. Because I was running this
    process on system which have 65GB RAM.

    —
    Reply to this email directly or view it on GitHub
    #5455 (comment)
    .

  5. TharinduKetipe commented on Nov 10, 2015

    @TharinduKetipe
    Author

    Yup. But there are some other huge processes too. So Tillsten should right I was running out of memory.

  6. TharinduKetipe commented on Nov 11, 2015

    @TharinduKetipe
    Author

    When we are plotting multiple graphs in the same plot . Does library plot one by one and merge them?

  7. tacaswell commented on Nov 11, 2015

    @tacaswell
    Member

    There is a limit in the underlying Agg where the rendering buffer is indexed with a uint16 (of which we can use 15bits?) which too-small for your image.

    See #3451, #2105

    attn @mdboom

  8. added this to the milestone on Nov 11, 2015
  9. mdboom commented on Nov 11, 2015

    @mdboom
    Member

    @tacaswell is right about the limitations in the Agg rendering buffer size. I suspect it's true of most rasterizing libraries. You do eventually have to represent values in pixels, and Agg uses 32-bit ints as 16.16 fixed point values, to the maximum number of pixels in any dimension is 2^16. Using floating point wouldn't solve the problem because then you'd lose precision when the pixel values got high enough.

    To deal with really large images, you can sometimes get away with exporting to a vector format (PDF/SVG/PS), however.

  10. TharinduKetipe commented on Nov 12, 2015

    @TharinduKetipe
    Author

    Also PDF wasn't working.

  11. WeatherGod commented on Nov 12, 2015

    @WeatherGod
    Member

    Depending on what you are plotting, even the vectorized backends may
    utilize the AGG backend for any rasterized portions of the plot.

    On Thu, Nov 12, 2015 at 11:28 AM, Tharindu Ketipearachchi <
    notifications@github.com> wrote:

    Also PDF wasn't working.

    —
    Reply to this email directly or view it on GitHub
    #5455 (comment)
    .

  12. mdboom commented on Nov 12, 2015

    @mdboom
    Member

    @TharinduKetipe wrote:

    Also PDF wasn't working.

    Can you provide more details, such as a backtrace?

  13. TharinduKetipe commented on Nov 13, 2015

    @TharinduKetipe
    Author

    Actually the same image size which I have provided before, wasn't working for the png format. Then I was trying to create that figure from the pdf format. But I was return the empty pdf document. I was trying it several times, sometimes pdf was created with only X axis and Y axis nothing in the middle of the graph.

  14. modified the milestones: , on Oct 3, 2017
  15. QuLogic commented on Apr 22, 2020

    @QuLogic
    Member

    I don't think there's any need to keep this open, given that Agg limitations are already covered in #2105.

  16. removed this from the future releases milestone on Oct 6, 2022
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