12.07.2015 Views

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

MATLAB Function Reference (Volume 2: Graphics)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

print, printoptNotes on Printing Interpolated Shading with PostScript Drivers<strong>MATLAB</strong> can print surface objects (such as graphs created with surf or mesh)using interpolated colors. However, only patch objects that are composed oftriangular faces can be printed using interpolated shading.Printed output is always interpolated in RGB space, not in the colormap colors.This means, if you are using indexed color and interpolated face coloring, theprinted output can look different from what is displayed on screen. See“Interpolating in Indexed vs. Truecolor” in the Using <strong>MATLAB</strong> <strong>Graphics</strong>manual for an illustration of each type of interpolation.PostScript files generated for interpolated shading contain the colorinformation of the graphics object’s vertices and require the printer to performthe interpolation calculations. This can take an excessive amount of time andin some cases, printers may actually “time-out" before finishing the print job.One solution to this problem is to interpolate the data and generate a greaternumber of faces, which can then be flat shaded.To ensure that the printed output matches what you see on the screen, printusing the -zbuffer option. To obtain higher resolution (for example, to maketext look better), use the −r option to increase the resolution. There is, however,a trade-off between the resolution and the size of the created PostScript file,which can be quite large at higher resolutions. The default resolution of 150 dpigenerally produces good results. You can reduce the size of the output file bymaking the figure smaller before printing it and setting the figurePaperPositionMode to auto, or by just setting the PaperPosition property toa smaller size.Note that in some UNIX environments, the default lpr command cannot printfiles larger than 1 Mbyte unless you use the −s option, which <strong>MATLAB</strong> does bydefault. See the lpr man page for more information.ExamplesThis example prints a surface plot with interpolated shading. Setting thecurrent figure’s (gcf) PaperPositionMode to auto enables you to resize the2-375

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!