I want to plot a huge amount of binary data (a 2700x2001 matrix, 5402700 points), and for that I am using the Graphics[Raster[]]
function. With just that command, namely
Graphics[Raster[listofpoints]]
gives the following graph
Now, I use the same code but with another colour function
Graphics[Raster[listofpoints,ColorFunction->"TemperatureMap"]]
What I see is just a white square. If I try to save that "graph" and as I save it to .jpg, then I get the right image
But not when I save it to .pdf, the desired format. I just get a blank PDF.
On the other hand, if I choose to plot less points (2500x2001=5002500), then the graph is shown correctly and I can export it to .pdf without any issue.
Therefore I have two questions: Why does this happen? (I guess it has something to do with the maximum number of points that the laptop can somehow resolve or store), and how to solve this issue and obtain the desired graph exported in .pdf format?
EDIT: Although it has been suggested that this issue is the same as in here, I believe that the specific problem in both cases is not the same, since in the other question, when using ArrayPlot and MatrixPlot with nonzero matrices they obtain the appropriate output, as opposed to here.
Thank you for your time.