You are a guest. Restricted access. Read more.
SCaVis manual

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
man:visual:plot_annotations [2013/08/16 12:13]
admin [LaTeX equations]
man:visual:plot_annotations [2015/04/15 19:09] (current)
admin [Mathematical operators]
Line 56: Line 56:
 </​html>​ </​html>​
  
 +You can find more symbols in [[http://​www.htmlhelp.com/​reference/​html40/​entities/​symbols.html|Unicode Consortium for HTML symbols]].
  
 +Alternatively,​ you can use characters using numbers. See the unicode table [[http://​unicode-table.com/​ | unicode table]]
 +When defining a Unicode character, use "&",​ followed by "#",​ then a number and then close it with a semi-column. ​
 +For example, the string:
 +
 +<​code>​
 +s="W^{ &#​8723;​}"​
 +</​code>​
 +will show a W boson with minus and plus sign, <​html>&#​8723;</​html>​.
  
 ====== Simple labels ====== ====== Simple labels ======
Line 67: Line 76:
 ====== Interactive labels====== ====== Interactive labels======
  
-You can annotate your figure on the [[/​scavis/​api/​doc.php/jhplot/​HPlot|HPlot]] ​canvas ​+You can annotate your figure on the <javadoc sc>​jhplot.HPlot</javadoc> ​canvas ​
 putting interactive labels, so you can move them around with the mouse and edit. putting interactive labels, so you can move them around with the mouse and edit.
  
  
-  * [[/​scavis/​api/​doc.php/jhplot/​HLabel|HLabel]] ​a standard single-line label +  * <javadoc sc>​jhplot.HLabel</javadoc> ​a standard single-line label 
-  * [[/​scavis/​api/​doc.php/jhplot/HMLabel|HLabelEq]] ​an interactive ​multiline label +  * <javadoc sc>​jhplot.HMLabel</javadoc> a standard multi-line label 
-  * [[/​scavis/​api/​doc.php/jhplot/​HKey|HKey]] ​interactive key to annotate shown data+  * <javadoc sc>jhplot.HLabelEq<​/javadoc> ​an interactive ​Latex equation 
 +  * <javadoc sc>​jhplot.HKey</javadoc> ​interactive key to annotate shown data
  
 The text labels can be set manually or via the label property window (click on the interactive label to bring up a dialog). The text labels can be set manually or via the label property window (click on the interactive label to bring up a dialog).
Line 79: Line 89:
 text should be included as for the standard LaTeX syntax. text should be included as for the standard LaTeX syntax.
  
-$X^{2}$ can be shown as "​X^{2}"​ 
  
-$X_{2}$can be shown as "​X_{2}"​+  * "X^{2}" will be shown as $X^{2}$  
 +  * "​X_{2}" ​will be displayed ​ as $X_{2}$
  
-To indicate over-line, use the reserved word "​bar{}":​ 
  
-  
-$\overline{X}$ can be shown as "​bar{X}"​ 
  
 +To indicate over-line, use the reserved word <​nowiki>#​bar{}</​nowiki>​. For example, to display $\overline{X+Y}$,​ use  <​nowiki>#​bar{X+Y}</​nowiki>​.
 +
 +To display a square root $\sqrt{X+Y}$,​ use 
 +<​nowiki>#​sqrt{X+Y}</​nowiki>​.
 +
 +To make a space between characters, use the usual space. To make a back-space, use the predefined
 +keyword <​nowiki>#​bs2{}</​nowiki>​. This creates a backspace with the width of one character.
 +To make a smaller backspace, equal to 1/2 of the character width, use  <​nowiki>#​bs1{}</​nowiki>​.
 +
 +One can mix this syntax to show complicated mathematical equations in the labels.
  
 Symbols must be encoded using the entity reference notation as shown in the above sections. Symbols must be encoded using the entity reference notation as shown in the above sections.
 For example, the Greek "​omega"​ should be written as "&​omega;"​ For example, the Greek "​omega"​ should be written as "&​omega;"​
  
 +This is a small example that shows data points and create labels using mathematical symbols and Greek letters.
 +
 +{{:​man:​visual:​annotations_math.png}}
  
 +The Jython / Python ​ script that creates this figure is given below. You can use the Java syntax to create a similar plot.
 +<ifauth !@member>​
 +<note important>​
 +Unregistered users have a limited access to this section.
 +You can unlock advanced pages after  becoming [[/​scavis/​members/​selock| a full member]].
 +</​note>​
 +</​ifauth>​
 +<ifauth @member,​@admin,​@editor>​
 +<code python 1|t annotate_math.py >
 +extern> annotate_math.py
 +</​code>​
 +</​ifauth>​
  
 ====== Interactive legends ====== ====== Interactive legends ======
Line 101: Line 133:
  
 Still, one can set legends for data manually. ​ Still, one can set legends for data manually. ​
-Look at the API of the [[/​scavis/​api/​doc.php/jhplot/​HKey|HKey]] ​class. ​+Look at the API of the <javadoc sc>​jhplot.HKey</javadoc> ​class. ​
  
-In this example, we have disabled automatic legends and made legends using the  ​[[/​scavis/​api/​doc.php/jhplot/​HKey|HKey]] ​class. ​+In this example, we have disabled automatic legends and made legends using the  ​<javadoc sc>​jhplot.HKey</javadoc> ​class. ​
 We plot 3 different objects, which we pass to the HKey to make legends. We plot 3 different objects, which we pass to the HKey to make legends.
  
man/visual/plot_annotations.1376676791.txt.gz · Last modified: 2013/08/16 12:13 by admin
CC Attribution-Share Alike 3.0 Unported
Powered by PHP Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0 Valid HTML5