From: Oliver Woodford on 25 May 2010 04:59 "TC Christensen" wrote: > Hello, > > I am writing in the hope that someone in the Matlab-community might be able to help me with the following issue: > I am using the surf-plot command to plot a three dimensional plot, and I then rotate the plot via view(2), such that it is view from the top down. Since I am using labels with the ('Interpreter','LaTeX')-option I would like to save the figure as a .pdf figure rendered with 'painters'. Specifically, I currently use the package 'export_fig', to save the figure. > However, the saved image becomes very large, around 1½ mb, and loads very slowly. I've tried using the renderer-options 'openGL' and 'zBuffer' aswell: They produce nice results, with nice plots and small datasize - but the fontsize of the labels are sadly somewhat messed (and I really need the fontsize to be consistent). > > Any advice? Is there any way that I can continue to save the image as a .pdf and still use the 'painters'-renderer - or should I take an entirely different path? For instance, is there another a better alternative than 'surf', for plotting a color-plot of a certain value across x and y? > > Thank you in advance. Best regards, > Thomas Hi Thomas Just for anyone else reading this, it's worth noting that the problem of large file size is not specific to the output of export_fig, but the output of print in general, and happens when exporting large patch models, e.g. surfaces, in vector format. There are several ways round it. 1) You can reduce the number of patches in your surface. If your surface is smooth then this is a good candidate. 2) You can export the surface as a bitmap and the text in vector form, using exportfig (not export_fig!) which can be found here: http://www.mathworks.com/matlabcentral/fileexchange/727-exportfig 3) Use a different type of plot, as you mentioned. 4) You mentioned the font size changing when using the openGL renderer. A way round this is to export to png using the painters renderer (and export_fig), then convert the png to a pdf (assuming you really need to) using an external application. However, just testing this I've noticed a bug, so you'll need to wait for export_fig to be updated on the FEX before this works properly. HTH, Oliver
|
Pages: 1 Prev: Guide: Set handles out of closerequestfcn Next: (scatter)plot to image matrix |