Skip to content

"label"

mkraska edited this page Aug 5, 2022 · 8 revisions

[ "label", "name", [x, y], color ]

label, text anchor is center left, typeset in text mode. To use MathJax math mode bracket the label with \\( \\).

  • "name" label text
  • [x, y] position of text anchor
  • color (optional, default: "black") label color

Example

image

[
  [ "grid", "x","y", -5,5,-4,5, 50, [10,10], [0,0] ],
  [ "label", "name", [2, 2] ],
  [ "label", "\\(A\\)", [3, 2], "red" ],
  [ "point", "", [2, 2] ],
  [ "point", "", [3, 2] ]
]

Tryout Space

In order to try code snippets in jsfiddle,

  1. copy the code from the wiki page to the clipboard
  2. follow the link for the JSXGraph version you want to try
  3. Replace the code in the HTML section (contents of <p hidden id="init">) with the content of the clipboard
Clone this wiki locally