2
I need to produce an image plot of data as a pdf. There are a small number of pixels in the data (roughly 100 x 100), so each pixel is discernible (not a smooth image). I have tried exporting a pdf with a couple different scientific computing programs, but when I view the pdf in OS X Preview or Firefox's pdf.js plugin the data looks bad. Each individual pixel of data looks like it has been broken into about five pixels along one dimension and three along the other (the aspect ratio is not 1:1 in the figure) and these subpixels have slightly different colors, so the data is being blurred. I tried opening the pdf in Inkscape and it looks fine there. From Inkscape, I determined that the data is being embedded as a 100x100 pixel png, which looks fine in Preview when I extract it from the pdf and view it on its own.
So, what is the best option for getting a pdf with a sharp data plot? For now, I am going to create an oversampled png of the data and embed that into pdf. I don't like this solution too much because it makes the figure file size unnecessarily large and still means the image is blurry when you zoom in. Should it be possible to get the pdf to render a stretched image without smoothing? Are my scientific computing programs (Igor Pro and MATLAB) not formatting the pdf properly, or are Preview and Firefox not rendering it properly by smoothing it?