Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Group: Plot Manipulation
See also: setgopt

Function: getgopt
Description: Gets the layout of a plot. It is usually used to copy some of the layout components from one plot to another one.

Usage: gopt=getgopt(di, l_num, c_num)
Input:
di string, name of a display
l_num integer, represents the number of a row of the display di
c_num integer, represents the number of a column of the display di
Output:
gopt a composed object containing the following components:
"title"
contains the headline of a plot,
"xlim"
contains the limits of the x-axis,
"ylim"
contains the limits of the y-axis,
"xoffset"
contains the width of the axis border,
"yoffset"
contains the height of the axis border,
"xvalue"
contains the values m and k for the transformation m+k*x,
"yvalue"
contains the values m and k for the transformation m+k*y,
"xorigin"
contains the coordinates of the origin for the tickmarks of the x-axis,
"yorigin"
contains the coordinates of the origin for the tickmarks of the y-axis,
"xmajor"
contains the major for the tickmarks of the x-axis,
"ymajor"
contains the major for the tickmarks of the y-axis,
"xlabel"
contains the label for the x-axis,
"ylabel"
contains the label for the y-axis,
"rotpoint"
contains the rotation point of the graphic,
"rotcos"
contains the rotation cosinus matrix of the graphic,
"scal"
contains the scale matrix,
"transl"
contains the translation vector,
"border"
contains a boolean value for the border around the graph,
"xaxis"
contains a boolean indicating whether the x-axis should be drawn (=1) or not (=0),
"yaxis"
is a boolean indicating whether the y-axis should be drawn (=1) or not (=0),
"fonttype"
is a string indicating which font type is used for labels and title; possible options are "serif" (serif font), "sansserif" (sansserif font) and "monospaced" (non-proportional font)
"dispsize"
contains the size of the window with display/graphs,
"disppos"
contains the position of the window with display/graphs.

Example:
di=createdisplay(4, 1)
x=1:100
y=sin(x/20)+uniform(100, 1)/10
show(di, 1, 1, x~y)
show(di, 2, 1, x~y)
show(di, 3, 1, x~y)
show(di, 4, 1, x~y)
; you see that thanks to different width and size of each plot
; the axisborders have different width and height too.
; Futhermore, the height of the border is not enough to show
; the axis values and headline.
; We try to improve it:
setgopt(di, 1, 1, "yoffset", 20|20, "xoffset", 5|5)
gopt=getgopt(di, 1, 1)
setgopt(di, 2, 1, gopt)
setgopt(di, 3, 1, gopt)
setgopt(di, 4, 1, gopt)

Result:
You can see four graphs with the same settings.



(C) MD*TECH Method and Data Technologies, 05.02.2006