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 want to run 4 instances of my matlab code on 4 processor cores. im executing the job from head node. i created a parallel job and assigned number of workers. but i don''t get bac

Illustration of anonymous functions: Dissimilar functions stored in the M-files, when no argument is passed to an anonymous function, the parentheses should still be in the fu

A matlab function to calculate filter order

Intersect function and setdiff function: The intersect function rather than returns all the values which can be found in both of the input argument vectors. >> intersect(v

Sort algorithm for Sorting vectors of structures: Note that only the price field is compared in the sort algorithm, but the whole structure is replaced. That is therefore each

Uses of Function handles: The Function handles can also be generated for functions other than anonymous functions, both built-in & user-defined functions. For illustration, th

Creating Cell arrays: There are many ways to create cell arrays. For illustration, we will create a cell array in which one element will store an integer, one element store ch

Illustration of Matrix solutions: For illustration, consider the three equations below with 3unknowns x 1 ,x 2 , and x 3 : We can write this in the form Ax = b here A

Help command: The help command is used with the script rectarea, the function readlenwid, and the major function printrectarea. To see the first comment in the subfunction, as

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