Plotting graphs and functions
Examples
These are some functions integrated in Symja, which allow the output of a graphical “JavaScript control”.
- BarChart
- BoxWhiskerChart
- DensityHistogram
- Histogram
- PieChart
- ListLinePlot
- ListPlot
- ListPointPlot3D
- Manipulate
- ParametricPlot
- Plot
- Plot3D
Here are some corresponding examples:
The following example displays an undirected weighted Graph from graph theory functions:
TreeForm visualizes the structure of an expression:
Used JavaScript libraries
For the generation of these controls, Symja uses the following JavaScript libraries
- Math for evaluating common mathematical operations in JavaScript
- JSXGraph for interactive function plotting and charting
- MathCell for displaying 3D function plots
- vis-network for (graph) network views
You can get the HTML source code of the generated controls in most browser by doing a right-mouse-click on the control and selecting menu: This Frame -> View Frame Source
and save the HTML source code as standalone example on your file system.
Generating JavaScript output
If you would like to use the output from the plot or graph functions in your own web pages, you can generate the JavaScript source code with the JSForm function.
You can for example display the generated JavaScript form of the Manipulate function:
and insert it in a HTML template from the JSXGraph.org project.