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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Surface PropertiesEraseMode{normal} | none | xor | backgroundErase mode. This property controls the technique <strong>MATLAB</strong> uses to draw anderase surface objects. Alternative erase modes are useful for creating animatedsequences, where control of the way individual objects redraw is necessary toimprove performance and obtain the desired effect.• normal — Redraw the affected region of the display, performing thethree-dimensional analysis necessary to ensure that all objects are renderedcorrectly. This mode produces the most accurate picture, but is the slowest.The other modes are faster, but do not perform a complete redraw and aretherefore less accurate.• none — Do not erase the surface when it is moved or destroyed. While theobject is still visible on the screen after erasing with EraseMode none, youcannot print it because <strong>MATLAB</strong> stores no information about its formerlocation.• xor — Draw and erase the surface by performing an exclusive OR (XOR)with each pixel index of the screen behind it. Erasing the surface does notdamage the color of the objects behind it. However, surface color depends onthe color of the screen behind it and is correctly colored only when over theaxes background Color, or the figure background Color if the axes Color isset to none.• background — Erase the surface by drawing it in the axes’ backgroundColor, or the figure background Color if the axes Color is set to none. Thisdamages objects that are behind the erased object, but surface objects arealways properly colored.Printing with Non-normal Erase Modes. <strong>MATLAB</strong> always prints figures as if theEraseMode of all objects is normal. This means graphics objects created withEraseMode set to none, xor, or background can look different on screen than onpaper. On screen, <strong>MATLAB</strong> may mathematically combine layers of colors (e.g.,XORing a pixel color with that of the pixel behind it) and ignorethree-dimensional sorting to obtain greater rendering speed. However, thesetechniques are not applied to the printed output.You can use the <strong>MATLAB</strong> getframe command or other screen captureapplication to create an image of a figure containing non-normal mode objects.2-486

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

Saved successfully!

Ooh no, something went wrong!