2

JSXGraph入门教程(2) - 环境搭建

 3 years ago
source link: https://segmentfault.com/a/1190000040397045
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

JSXGraph入门教程(2) - 环境搭建

发布于 33 分钟前

From https://ipesek.github.io/jsxg...

准备构建JSXgraph图表的时候,最便利的方法是本地加载。为此我们需要新建文件(比如example.htm),
复制粘贴下方提供的模板,便可开始构建。
我们保存文件程序后,就可以在自己最喜欢的浏览器(火狐,Chrome或其他)里打开了。
重复以下过程:编辑、保存,之后刷新(浏览器界面按F5),直到得到我们满意的结果。

以下为用于构建和测试的基本模板。

<!DOCTYPE HTML>
<html lang="en">
  <head>
    <meta charset="UTF-8">
    <title>JSXGraph template</title>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/distrib/jsxgraph.css" rel="stylesheet" type="text/css" />
    <script src="https://cdn.jsdelivr.net/npm/[email protected]/distrib/jsxgraphcore.js" type="text/javascript" charset="UTF-8"></script>
    <!-- The next line is optional: MathJax -->
    <script src="https://cdn.jsdelivr.net/npm/mathjax@3/es5/tex-chtml.js" id="MathJax-script" async></script>
  </head>
  <body>

  <div id="jxgbox" class="jxgbox" style="width:500px; height:200px;"></div>

  <script>
    var board = JXG.JSXGraph.initBoard('jxgbox', {boundingbox: [-5, 2, 5, -2]});
  </script>

  </body>
</html>

这些脚本都从互联网中下载,因此我们需要稳定的网络连接。


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK