figure 对象的属性(另请参阅 figure):
外观 | 回调执行 | 创建/删除 | 显示 | 键盘交互 | 鼠标交互 | 对象标识 | 对象位置 | 父级对象/子级对象 | 打印/保存 | 未使用
alphamap: def. 64-by-1 double ¶图形对象尚未实现透明度。alphamap 未使用。
color: colorspec, def. [1 1 1] ¶图形背景的颜色。请参阅 colorspec。
colormap: N-by-3 matrix, def. 256-by-3 double ¶包含当前坐标轴 RGB 颜色图的矩阵。
graphicssmoothing: "off" | {"on"} ¶使用平滑技术减少锯齿状线条的出现。
name: string, def. "" ¶要显示在图形标题栏中的名称。该名称显示在 numbertitle 属性确定的任何标题的右侧。
numbertitle: "off" | {"on"} ¶在图形标题栏中显示 "Figure" 及数字图形句柄值。
busyaction: "cancel" | {"queue"} ¶定义当 Octave 无法中断另一个对象正在执行的回调时,如何处理此对象回调属性的执行。这仅在当前正在执行回调的对象的 interruptible 属性设置为 "off" 时相关。中断回调对象的 busyaction 属性指示中断回调是排队("queue",默认)还是丢弃("cancel")。请参阅 回调章节。
interruptible: "off" | {"on"} ¶指定此对象的回调函数是否可以被其他回调中断。默认情况下 interruptible 为 "on",使用 drawnow、figure、waitfor、getframe 或 pause 函数的回调最终会被中断。请参阅 回调章节。
beingdeleted: {"off"} | "on" ¶指示函数已启动对象删除的属性。beingdeleted 设置为 true,直到对象不再存在为止。
closerequestfcn: string | function handle, def. "closereq" ¶删除图形时执行的函数。请参阅 closereq 函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
createfcn: string | function handle, def. [](0x0) ¶图形创建后立即执行的回调函数。该函数通过使用根对象的默认属性来设置,例如 set (groot, "defaultfigurecreatefcn", 'disp ("figure created!")')。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
deletefcn: string | function handle, def. [](0x0) ¶在删除图形之前立即执行的回调函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
visible: "off" | {"on"} ¶如果 visible 为 "off",则图形不会在屏幕上呈现。
windowstate: "fullscreen" | "maximized" | "minimized" | {"normal"} ¶图形对象的窗口状态调整尚未实现。windowstate 未使用。
windowstyle: "docked" | "modal" | {"normal"} ¶图形的窗口样式。为以下值之一:
normal窗口可以被取消选中,其他窗口可以显示在该窗口前面。
modal窗口将保持在所有普通图形之上,直到它被关闭。
docked未实现。
更改可见图形对象的模式可能会导致图形关闭并重新打开。
keypressfcn: string | function handle, def. [](0x0) ¶当图形具有焦点且按下某个键时执行的回调函数。该函数的第一个参数是调用图形的句柄。第二个参数包含一个事件结构体,包含以下成员:
Character:按键的 ASCII 值
Modifier:一个元胞数组,包含表示与按键同时按下的修饰键的字符串。
Key:按键的小写描述
Source:执行回调函数的对象的图形句柄
EventName:"KeyPress"
有关如何编写图形监听器函数的信息,请参阅 回调章节。
keyreleasefcn: string | function handle, def. [](0x0) ¶当图形具有焦点且释放某个键时执行的回调函数。该函数的第一个参数是调用图形的句柄。第二个参数包含一个事件结构体,包含以下成员:
Character:按键的 ASCII 值
Modifier:一个元胞数组,包含表示与按键同时按下的修饰键的字符串。
Key:按键的小写描述
Source:执行回调函数的对象的图形句柄
EventName:"KeyRelease"
有关如何编写图形监听器函数的信息,请参阅 回调章节。
windowkeypressfcn: string | function handle, def. [](0x0) ¶当图形具有焦点且按下某个键时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
windowkeyreleasefcn: string | function handle, def. [](0x0) ¶当图形具有焦点且释放某个键时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
buttondownfcn: string | function handle, def. [](0x0) ¶有关如何编写图形监听器函数的信息,请参阅 回调章节。
contextmenu: graphics handle, def. [](0x0) ¶当前与此图形对象关联的 uicontextmenu 对象的图形句柄。
currentpoint (read-only): two-element vector, def. [0; 0] ¶一个 1×2 的向量,用于保存鼠标事件发生时鼠标指针所在点的坐标。X 和 Y 坐标的单位由图形的 units 属性定义,其原点为绘图区域的左下角。
设置 currentpoint 的事件包括:
始终
仅当图形的回调 windowbuttonupfcn 已定义时
仅当图形的回调 windowbuttonmotionfcn 已定义时
hittest: "off" | {"on"} ¶指定图形对象是处理鼠标事件还是将事件传递给对象的祖先。启用后,对象可以通过评估 "buttondownfcn"、显示 uicontextmenu 并最终访问根 "currentobject" 来响应鼠标事件。仅在对象可以通过 "pickableparts" 属性被选中时才有意义。请参阅 pickableparts 属性。
menubar: {"figure"} | "none" ¶控制图形菜单栏在图形顶部的显示。
pointer: {"arrow"} | "botl" | "botr" | "bottom" | "circle" | "cross" | "crosshair" | "custom" | "fleur" | "hand" | "ibeam" | "left" | "right" | "top" | "topl" | "topr" | "watch" ¶与图形画布关联的鼠标指针形状的名称。当 pointer 为 "custom" 时,形状从 pointershapecdata 属性中获取。
pointer 在图形处于缩放、平移或旋转模式时无效。在这种情况下,Octave 会自动使用适合该模式的指针形状。
pointershapecdata: 16-by-16 or 32-by-32 Matrix, def. 16-by-16 double ¶定义自定义指针的 m×m 矩阵。每个元素定义一个像素,其中元素 (1,1) 表示左上角的像素。值为 1 表示黑色,值为 2 表示白色,所有其他值均渲染为透明。
pointershapehotspot: two-element vector, def. [1 1] ¶仅用于自定义指针。pointershapehotspot 定义 pointershapecdata 中用作指针位置的像素行和列。
resize: "off" | {"on"} ¶控制是否可以通过使用鼠标拖动窗口边框和角来调整图形的大小。当 resize 为 "off" 时,鼠标交互被禁用,但图形仍然可以通过更改其 "position" 属性来调整大小。
resizefcn: string | function handle, def. [](0x0) ¶resizefcn 已弃用。请使用 sizechangedfcn 替代。
sizechangedfcn: string | function handle, def. [](0x0) ¶每当图形调整大小时执行的回调函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
uicontextmenu: graphics handle, def. [](0x0) ¶与此图形对象关联的 uicontextmenu 对象的图形句柄。
windowbuttondownfcn: string | function handle, def. [](0x0) ¶在图形上按下鼠标按钮时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
windowbuttonmotionfcn: string | function handle, def. [](0x0) ¶当指针在图形上移动时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
windowbuttonupfcn: string | function handle, def. [](0x0) ¶鼠标按钮在图形上释放时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
windowscrollwheelfcn: string | function handle, def. [](0x0) ¶鼠标滚轮滚动时执行的函数。
有关如何编写图形监听器函数的信息,请参阅 回调章节。
integerhandle: "off" | {"on"} ¶将图形句柄分配为整数(通常是可以再次用于创建新图形的下一个整数)。如果此属性设置为 "off",Octave 将分配下一个可用的整数,而不管该整数之前是否已被同一会话中的图形使用过。
nextplot: "add" | "new" | {"replace"} | "replacechildren" ¶在高层级绘图函数中指定重新使用图形的方式。该属性默认为 "replace",这意味着高层级绘图函数将在绘图之前重置所有图形属性。设置为 "add" 时,图形将保持其现有属性。值为 "new" 会导致高层级绘图函数创建一个新图形,而 "replacechildren" 仅删除当前图形的子对象(轴对象)而不重置图形属性。
tag: string, def. "" ¶一个字符串标签,用于标识图形对象。
type (read-only): string, def. "figure" ¶图形对象的类名称。type 始终为 "figure"。
uicontextmenu: graphics handle, def. [](0x0) ¶与此图形对象关联的 uicontextmenu 对象的图形句柄。
userdata: any Octave data, def. [](0x0) ¶用户希望关联到图形对象的任意数据。
position: four-element vector, def. [300 200 560 420] ¶向量 [left bottom width height]。默认情况下,left bottom 是屏幕左下角的偏移量,width 和 height 是图形的尺寸。另请参阅 units 属性。此属性定义图形的可绘制区域。如果设置了 outerposition,则此值可能不包括外部边框。
outerposition: four-element vector, def. [300 200 560 420] ¶向量 [left bottom width height]。默认情况下,left bottom 是屏幕左下角的偏移量,width 和 height 是图形的尺寸。另请参阅 units 属性。此属性定义图形的外部边界,包括标题栏、菜单栏等。仅当显式设置时才用于定位。
units: "centimeters" | "characters" | "inches" | "normalized" | {"pixels"} | "points" ¶用于计算 position 和 outerposition 属性的单位。
children (read-only): vector of graphics handles, def. [](0x0) ¶图形的子对象的图形句柄。
handlevisibility: "callback" | "off" | {"on"} ¶如果 handlevisibility 为 "off",则图形对象的句柄在其父对象的 "children" 属性中不可见。
parent: graphics handle, def. 0 ¶父级图形对象的句柄。
filename: string, def. "" ¶保存图形时使用的文件名。
inverthardcopy: "off" | {"on"} ¶打印时,将图形和坐标轴的背景色替换为白色。
paperorientation: "landscape" | {"portrait"} ¶papersize 和 paperposition 属性的值取决于 paperorientation。当 paperorientation 在 "portrait" 和 "landscape" 之间切换时,papersize 和 paperposition 的水平和垂直值会互换。
paperposition: four-element vector, def. [1.3422 3.3191 5.8156 4.3617] ¶向量 [left bottom width height],定义图形在打印页面上的位置和大小(以 paperunits 为单位)。位置 [left bottom] 定义图形在页面上的左下角,大小由 [width height] 定义。对于不隐式渲染到纸上的输出格式,width 和 height 定义图像的大小,位置信息被忽略。设置 paperposition 也会强制将 paperpositionmode 属性设置为 "manual"。
paperpositionmode: {"auto"} | "manual" ¶如果 paperpositionmode 设置为 "auto",则 paperposition 属性会自动计算:打印的图形将与屏幕上的图形具有相同的大小,并居中在输出页面上。将 paperpositionmode 设置为 "auto" 不会修改 paperposition 属性的值。
papersize: two-element vector, def. [8.5000 11.0000] ¶向量 [width height],定义用于打印的纸张尺寸。将 papersize 属性设置为某个值,如果该值与定义的某个 papertype 不关联或与 paperorientation 的设置不一致,则会强制将 papertype 属性设置为 "<custom>"。如果 papersize 设置为与支持的 papertype 相关联且与 paperorientation 一致的值,则 papertype 值将更新为关联值。
papertype: "<custom>" | "a" | "a0" | "a1" | "a2" | "a3" | "a4" | "a5" | "arch-a" | "arch-b" | "arch-c" | "arch-d" | "arch-e" | "b" | "b0" | "b1" | "b2" | "b3" | "b4" | "b5" | "c" | "d" | "e" | "tabloid" | "uslegal" | {"usletter"} ¶用于打印输出的纸张名称。设置 papertype 也会同时更改 papersize,同时保持与 paperorientation 属性的一致性。
paperunits: "centimeters" | {"inches"} | "normalized" | "points" ¶用于计算 paperposition 属性的单位。从物理单位(例如 "inches")的转换取决于根对象的 screenpixelsperinch 属性。
renderer: {"opengl"} | "painters" ¶用于打印的渲染引擎。仅在 renderermode 为 "manual" 时使用。设置 renderer 也会强制将 renderermode 属性设置为 "manual"。
renderermode: {"auto"} | "manual" ¶控制用于打印的渲染引擎是自动选择还是由 renderer 属性指定。请参阅 print 函数。
版权所有 © 2024-2026 Octave中文网
ICP备案/许可证号:黑ICP备2024030411号-4