Scilab Website | Contribute with GitLab | Mailing list archives | ATOMS toolboxes
Scilab Online Help
5.5.1 - 日本語

Change language to:
English - Français - Português - Русский

Please note that the recommended version of Scilab is 2024.0.0. This page might be outdated.
See the recommended documentation of this function

Scilabヘルプ >> Graphics > Datatips > datatipSetDisplay

datatipSetDisplay

datatip文字列を計算する際に使用される関数を設定.

呼び出し手順

datatipSetDisplay(handle,"fun")

datatipSetDisplay(handle, fun)

引数

handle

datatipまたはその親のハンドル.

"fun"

関数(type==11 または type==13) またはこの関数の名前 を有する変数. この関数の呼び出し手順は, str=fun(h) である必要があります. ただし, hはdatatipのハンドルです.

この関数は文字列または文字列のベクトルを strに返す必要があります.

説明

datatip点に表示されるテキストを整形する際に使用される 関数を設定します. datatipの親のハンドルが最初の引数に設定された場合, 表示関数を有さない全てのdatatipは同じ関数を共用します.

x=linspace(-1,1,1000);

clf()

plot(x,sinc(20*x),x,1-x.^2);

e=gce();e=e.children;

d21=datatipCreate(e(2),600);

d1=datatipCreate(e(1),700);

function str=mydisplay(h)

    pt = h.data;

    str=msprintf('sinc(%-0.2g)=%-0.2g', 20*pt(1),pt(2))

endfunction

datatipSetDisplay(d21,"mydisplay")
表示関数は異なる位置にtipテキストを配置する際にも 使用できます:
function str=infodisplay(h)

    pt = h.data;

    xinfo(msprintf('x=%0.2g,\t 1-x^2=%0.2g', pt(1),pt(2)))

    str=''

endfunction

datatipSetDisplay(d1,"infodisplay") //infoバー上にtipテキストを表示

参照

  • datatips — プロットされた曲線に情報(tips)を配置,編集するためのツール.
  • datatipSetOrientation — 指定したtipに関係するテキストボックスの位置を設定.
Report an issue
<< datatipRemoveAll Datatips datatipSetInterp >>

Copyright (c) 2022-2023 (Dassault Systèmes)
Copyright (c) 2017-2022 (ESI Group)
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Thu Oct 02 13:58:25 CEST 2014