12.07.2015 Views

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

Basics of MATLAB and Beyond

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

There are usually a great many properties associated with a givengraphical object. For example the x- <strong>and</strong> y-axis limits are given by twoseparate properties, xlim <strong>and</strong> ylim. Continuing with the example above:>> get(gca,’xlim’)ans =0 10>> get(gca,’ylim’)ans =-1 1The locations <strong>of</strong> the x-axis tick marks are another property:>> get(gca,’xtick’)ans =0 2 4 6 8 10The width <strong>of</strong> the line used to draw the axes is>> get(gca,’linewidth’)ans =0.5(Your line width might be different.) There are many more. To geta complete list <strong>of</strong> the properties <strong>of</strong> a graphical object, leave out theproperty argument in a call to get. For example, the properties <strong>of</strong> theAxes object are>> get(gca)AmbientLightColor = [1 1 1]Box = onCameraPosition = [3.5 0 17.3205]CameraPositionMode = autoCameraTarget = [3.5 0 0]CameraTargetMode = autoCameraUpVector = [0 1 0](<strong>and</strong> so on)And the properties <strong>of</strong> a Line object are (carrying on from the sine-waveexample above):>> get(h)Color = [1 0 0]EraseMode = normalLineStyle = -LineWidth = [0.1]Marker = oMarkerSize = [6]c○ 2000 by CRC Press LLC

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

Saved successfully!

Ooh no, something went wrong!