[Tex/LaTex] Matlab->plot2svg->Inkscape->pdf+latex->includesvg = slow rendering pdf + large file. How to solve that

file sizeinkscapeMATLABsvg

I have the following workflow. I use matlab to produce 3D plots with transparency and I want to use the workflow of setting the text inside the figure in latex. I am using Texniccenter and MikTex the most recent versions my driver is pdflatex.

I use the matlab central funktion plot2svg to export my plot into svg. Than I use Inkscape to generate the pdf and the corresponding tex file. This generated pdf is already 3.5 MB large. I have two surfaces plotted with transparency. Maybe that's why the file is that large. My whole pdf resulting from my latex project is about the same size.

Of course if I use the includegraphics function with inside the picture environment and the the final pdf is larger than 6 MB. So if I have 10 pictures I already get a file more than 30 MB. So far so good. But if I open the file and navigate to the corresponding figure I can watch how the picture gets renderred. This takes several seconds.

Is there a way how to rreduce the file sizes maybe before including it into my document?

Thanks for your suggestions

Best Answer

plot2svg exports the whole data in the plot, even if you zoom inside the plot plot2svg will still export the whole data of the plot and NOT just the visible graph or image. Consider as example an image matrix with 4000 x 4000 px. If you confine your displayed data by plotting only the necessary part (of interest) of your data (i.e. imshow(IMAGE(100:300, 100:300))), then only this data will be exported by plot2svg and the resulting file size of the pictures which are included in the svg-file will be smaller. Hope you find this useful!