You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Matplotlib is crashed over figersize=(288,16) and dpi = 500 #5455
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?
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
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.
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.
@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.
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.
Activity
[-]Matplotlib is crashed over figerzize=(288,16) and dpi = 500[/-][+]Matplotlib is crashed over figersize=(288,16) and dpi = 500[/+]Tillsten commentedon Nov 10, 2015
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.
TharinduKetipe commentedon Nov 10, 2015
Sorry. I thought it is an issue of the library. Because I was running this process on system which have 65GB RAM.
WeatherGod commentedon Nov 10, 2015
"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:
TharinduKetipe commentedon Nov 10, 2015
Yup. But there are some other huge processes too. So Tillsten should right I was running out of memory.
TharinduKetipe commentedon Nov 11, 2015
When we are plotting multiple graphs in the same plot . Does library plot one by one and merge them?
tacaswell commentedon Nov 11, 2015
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
mdboom commentedon Nov 11, 2015
@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.
TharinduKetipe commentedon Nov 12, 2015
Also PDF wasn't working.
WeatherGod commentedon Nov 12, 2015
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:
mdboom commentedon Nov 12, 2015
@TharinduKetipe wrote:
Can you provide more details, such as a backtrace?
TharinduKetipe commentedon Nov 13, 2015
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.
QuLogic commentedon Apr 22, 2020
I don't think there's any need to keep this open, given that Agg limitations are already covered in #2105.