Graphics properties, MATLAB in Engineering

Graphics Properties:

The MATLAB uses the Handle Graphics in all its figures. All figures consist of various objects, each of which is assigned a handle. The object handle is a exclusive real number which is used to refer to the object.

The different plot functions return a handle for the plot object that can then be stored in a variable. The plot function plots a sin function as shown below in a Figure Window and returns a real number that is the object handle. This handle will remain valid as long as the object exists.

1001_Graphics Properties.png

  >> x = -2*pi: 1/5 : 2*pi;

     >> y = sin(x);

     >> hl = plot(x,y)

     hl =

    158.5420

Note that after getting the plot, the Figure Window must not be closed, so that it would make the object handle invalid as the object wouldn't exist anymore! The properties of that object can be exhibited using the get function. This displays properties like the LineStyle, Color, LineWidth, and so forth.

 

>> get(hl)

     Color:  [0 0 1]

   EraseMode:  'normal'

  LineStyle:  '-'

   LineWidth:  0.5000

   Marker:  'none'

   MarkerSize:  6

  MarkerEdgeColor:  'auto'

   MarkerFaceColor:  'none'

   XData:  [1x63 double]

   YData:  [1x63 double]

   ZData:  [1x0 double]

   BeingDeleted:  'off'

  ButtonDownFcn:  []

  Children:  [0x1 double]

  Clipping:  'on'

  CreateFcn:  []

   DeleteFcn:  []

   BusyAction:  'queue'

  HandleVisibility:  'on'

  HitTest:  'on'

   Interruptible:  'on'

   Selected:  'off'

   SelectionHighlight: 'on'

     Tag:  ''

  Type:  'line'

  UIContextMenu:  []

  UserData:  []

  Visible:  'on'

  Parent:  157.5415

   DisplayName:  ''

    XDataMode:  'manual'

  XDataSource:  ''

  YDataSource:  ''

   ZDataSource:  ''

Posted Date: 10/22/2012 2:05:01 AM | Location : United States







Related Discussions:- Graphics properties, Assignment Help, Ask Question on Graphics properties, Get Answer, Expert's Help, Graphics properties Discussions

Write discussion on Graphics properties
Your posts are moderated
Related Questions
I have a vector of X, one for Y , one for x-direction velocity U and one for y-direction velocity V. they are at same size. How can I plot streamline of that flow? I follow all exa

Anonymous Functions: The anonymous function is a very easy, one-line function. The benefit of an anonymous function is that it does not have to be stored in an M-file. This ca

Illustration of Graphics properties: A particular property can also be exhibited, for illustration, to view the line width:     >> get(hl,'LineWidth')     ans =

1. Write a MATLAB function (upperTriangle) using the functions you previously created to convert a matrix to upper triangular form. Start with row 1, column1. Find the row that has

Expanding a function: The expand function will multiply out terms, and factor will do the opposite: >> expand((x+2)*(x-1)) ans = x^2 x-2 >> factor(ans)

printrectarea function: function call: printrectarea(length, width) function header: function printrectarea(len, wid)   In the function call, there are two argume

Sound Files: The sound signal is an illustration of a continuous signal which is sampled to result in a discrete signal. In this situation, sound waves traveling through the a

Function used in binary search: The function below implements this binary search algorithm. It receives two arguments: the sorted vector and a key (on the other hand, the func

Illustration of initializing the data structure: illustration of initializing the data structure by preallocating is here as shown: >> cyls(3) = struct('code', 'c', 'dimen

Example of Menu driven modular program: As an illustration of such a menu-driven program, we will write a program to discover the constant e. The constant e, known as the n