Plotting to many points with CairoMakie results in empty rendered images

Hi everybody,
This is my first post here even when i’m a very “old” Julia user, I learned this language since v.0.3.2, and I’m very grateful with all the developers of Julia and Makie.

My matter is this, I need to plot two matrices of experimental data each one with 512 x 8001 points. I can’t show you the real data because it will be published, but I prepared matrices with dummy data that resembles the real issue. When I plot them with GLMakie the plots are correctly shown in the pop up window.

But, when i tried save the plot using CairoMakie as PDF of PNG, these are my results:

I know that is something related with the number of points because, I tried it again with less points, and I got the plots correctly. Is there something that I can do to resolve my problem?

To make things worse, I got no error messages.

Thanks in advance.

This is how it supposed to look like. (I’m new here so I can’t post more than a single image.)

Do you mean PDF or PNG? Meshes in cairomakie are drawn in a less sophisticated way than in GLMakie (painter’s algorithm without z buffer) but I don’t see why a png wouldn’t work. No matter how many times you draw a triangle on a bitmap, you still only have a fixed size bitmap. It’s different for pdf because there you make the resulting file huge if you add tons of mesh triangle primitives.

You could try adding rasterize = 1 (or 2, 3, etc) to the surface call because that will flatten the resulting mesh objects in the pdf into a single bitmap.

I could reproduce the problem locally and I open an issue for it: `CairoMakie`'s png output empty for large enough surface plot · Issue #2454 · MakieOrg/Makie.jl · GitHub