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
[Bug]: Lines between points are invisible when there are more than 7 subfigures per row #28893
This is likely not due to the number of subfigs, but rather the number of pixels.
Agg (the renderer we most commonly use) has some fairly deep fundamental limitations when it comes to rendering on large canvases, which have some complicated relationships with how various elements are drawn (hence why markers and text still show up, but lines do not)
You are making a figure that is 160 inches wide at 300 dpi. I expect that if you lower the DPI, it will work for more figures, but regardless, we just simply cannot render it with Agg.
Agg has a limit of 2**15 = 32,768 pixels in each dimension. In your example, that is exceeded by the 7th subfigure (716300 = 33,600), hence why it happens then.
Unfortunately it is unlikely to be changed any time soon, as it is pretty deeply ingrained and therefore hard to change.
Solutions may include, and which one is appropriate will vary based on specific usecases:
smaller figures
lower resolution (does it need to be 300 DPI)
multiple figures (does it need to be one figure, can it be composed in an external image editor?)
Using a cairo based backend?
I have not tried this recently, but know the specific limitation is in Agg, so other renderers may not be affected.
There are likely some size limitation still, not sure if they are the same size though.
Activity
ksunden commentedon Sep 26, 2024
This is likely not due to the number of subfigs, but rather the number of pixels.
Agg (the renderer we most commonly use) has some fairly deep fundamental limitations when it comes to rendering on large canvases, which have some complicated relationships with how various elements are drawn (hence why markers and text still show up, but lines do not)
You are making a figure that is 160 inches wide at 300 dpi. I expect that if you lower the DPI, it will work for more figures, but regardless, we just simply cannot render it with Agg.
Agg has a limit of 2**15 = 32,768 pixels in each dimension. In your example, that is exceeded by the 7th subfigure (716300 = 33,600), hence why it happens then.
Unfortunately it is unlikely to be changed any time soon, as it is pretty deeply ingrained and therefore hard to change.
Solutions may include, and which one is appropriate will vary based on specific usecases:
See also:
#26751
#26368
Probably more, these are just the more recent ones I found of effectively the same thing
vealocia commentedon Sep 26, 2024
Thanks for your quick reply! I will divide and draw each subfigure separately!
Agg: Use 32-bit scan line classes
Agg: Use 32-bit scan line classes
Agg: Use 32-bit scan line classes