{
 "app": "MathPad",
 "version": 3,
 "nextId": 121,
 "name": "绘图示例.mpad",
 "regions": [
  {
   "id": 1,
   "x": 40,
   "y": 40,
   "kind": "text",
   "latex": "",
   "text": "绘图示例。所有图点右上角 ⚙（图形选项）都能换图型（折线 / 散点 / 柱状 / 火柴杆 / 面积）、调采样点数、柱宽；鼠标悬停可以读数、拖框放大。多条曲线用分号隔开：plot(f;g, 起, 终)。"
  },
  {
   "id": 2,
   "x": 40,
   "y": 93,
   "kind": "text",
   "latex": "",
   "text": "一、画多条曲线的三种情形"
  },
  {
   "id": 3,
   "x": 40,
   "y": 127,
   "kind": "text",
   "latex": "",
   "text": "① 给定数据集：两组数据共用同一条横轴。先给横轴，再给两组 y，中间用分号隔开,或矩阵形式。"
  },
  {
   "id": 4,
   "x": 40,
   "y": 161,
   "kind": "math",
   "latex": "xs:=1,2,3,4,5,6,7,8",
   "text": ""
  },
  {
   "id": 5,
   "x": 40,
   "y": 211,
   "kind": "math",
   "latex": "ya:=3,5,4,7,6,9,8,10",
   "text": ""
  },
  {
   "id": 7,
   "x": 40,
   "y": 380,
   "kind": "math",
   "latex": "plot(ya;yb,xs)",
   "text": ""
  },
  {
   "id": 9,
   "x": 765,
   "y": 401,
   "kind": "math",
   "latex": "plot(4\\sin(x);fd(x),-6,6)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "xlabelSize": 11,
    "ylabelSize": 11,
    "tickSize": 11,
    "legendPos": "",
    "legendSize": 11,
    "xmin": "-5",
    "xmax": "5",
    "ymin": "-10",
    "ymax": "10",
    "xlog": false,
    "ylog": false,
    "axes": true,
    "xaxisPos": "zero",
    "yaxisPos": "zero",
    "colorscale": "",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "",
    "bins": "",
    "w": 560,
    "h": 300,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": []
   }
  },
  {
   "id": 11,
   "x": 60,
   "y": 1121,
   "kind": "text",
   "latex": "",
   "text": "③ 带未定参数的两条曲线：a、b 从来没定义过，图形框右侧就自动长出两个滑块框（每条曲线一个）。拖一下曲线立刻跟着变，只重算这一个图，不动整篇文档。"
  },
  {
   "id": 13,
   "x": 59,
   "y": 1874,
   "kind": "text",
   "latex": "",
   "text": "参数框里的同名参数默认\"各自独立\"；点参数名前面的链子按钮可以挂到一起，拖一个另一个跟着动。"
  },
  {
   "id": 14,
   "x": 40,
   "y": 1914,
   "kind": "text",
   "latex": "",
   "text": "二、采样点数与数据图"
  },
  {
   "id": 15,
   "x": 40,
   "y": 1947,
   "kind": "text",
   "latex": "",
   "text": "第 4 个参数 = 采样点数：点少是折线粗版，点多才光滑（默认 200）。"
  },
  {
   "id": 16,
   "x": 40,
   "y": 1980,
   "kind": "math",
   "latex": "plot(\\sin(x),-6,6,12)",
   "text": ""
  },
  {
   "id": 17,
   "x": 40,
   "y": 2334,
   "kind": "text",
   "latex": "",
   "text": "只给一组 y 时横轴默认是点序号 0,1,2…；要自己的横轴就把两组数据一起给：plot(xs, ys)。"
  },
  {
   "id": 18,
   "x": 40,
   "y": 2367,
   "kind": "math",
   "latex": "v:=\\begin{pmatrix}4\\\\9\\\\2\\\\7\\\\5\\\\8\\end{pmatrix}",
   "text": ""
  },
  {
   "id": 19,
   "x": 40,
   "y": 2530,
   "kind": "math",
   "latex": "plot(v)",
   "text": ""
  },
  {
   "id": 20,
   "x": 40,
   "y": 2884,
   "kind": "math",
   "latex": "xs2:=0, 0.5 .. 2.5",
   "text": ""
  },
  {
   "id": 21,
   "x": 40,
   "y": 2934,
   "kind": "math",
   "latex": "plot(xs2, v)",
   "text": ""
  },
  {
   "id": 22,
   "x": 40,
   "y": 3288,
   "kind": "text",
   "latex": "",
   "text": "三、柱状图：三组数据并排"
  },
  {
   "id": 23,
   "x": 40,
   "y": 3321,
   "kind": "text",
   "latex": "",
   "text": "分号分数据集 —— 一组一根柱子，同一个位置上的三根并排站。柱宽比例、并排还是堆叠，都在 ⚙ 里调。"
  },
  {
   "id": 24,
   "x": 40,
   "y": 3354,
   "kind": "math",
   "latex": "m:=2,4,6,8",
   "text": ""
  },
  {
   "id": 25,
   "x": 40,
   "y": 3404,
   "kind": "math",
   "latex": "q1:=5,7,6,9",
   "text": ""
  },
  {
   "id": 26,
   "x": 40,
   "y": 3454,
   "kind": "math",
   "latex": "q2:=3,4,5,6",
   "text": ""
  },
  {
   "id": 27,
   "x": 40,
   "y": 3504,
   "kind": "math",
   "latex": "q3:=6,5,8,7",
   "text": ""
  },
  {
   "id": 28,
   "x": 40,
   "y": 3554,
   "kind": "math",
   "latex": "bar(q1;q2;q3,m)",
   "text": ""
  },
  {
   "id": 29,
   "x": 40,
   "y": 3908,
   "kind": "text",
   "latex": "",
   "text": "四、其它统计图型（同一个 ⚙ 里也能互相切换）"
  },
  {
   "id": 30,
   "x": 40,
   "y": 3941,
   "kind": "math",
   "latex": "stem(v)",
   "text": ""
  },
  {
   "id": 31,
   "x": 40,
   "y": 4295,
   "kind": "math",
   "latex": "area(v)",
   "text": ""
  },
  {
   "id": 32,
   "x": 40,
   "y": 4649,
   "kind": "math",
   "latex": "pie(3,5,2,6)",
   "text": ""
  },
  {
   "id": 33,
   "x": 40,
   "y": 5043,
   "kind": "math",
   "latex": "scatter(x\\text{\\textasciicircum}^{2},-3,3)",
   "text": ""
  },
  {
   "id": 34,
   "x": 40,
   "y": 5397,
   "kind": "text",
   "latex": "",
   "text": "五、坐标与极坐标"
  },
  {
   "id": 35,
   "x": 40,
   "y": 5430,
   "kind": "math",
   "latex": "loglog(x\\text{\\textasciicircum}^{3},1,10)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "xlabelSize": 11,
    "ylabelSize": 11,
    "tickSize": 11,
    "legendPos": "",
    "legendSize": 11,
    "xmin": "0",
    "xmax": "1",
    "ymin": "",
    "ymax": "",
    "xlog": false,
    "ylog": false,
    "axes": true,
    "xaxisPos": "edge",
    "yaxisPos": "edge",
    "colorscale": "",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "",
    "bins": "",
    "w": 560,
    "h": 300,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": []
   }
  },
  {
   "id": 36,
   "x": 40,
   "y": 5784,
   "kind": "math",
   "latex": "polar(\\sin(3t),0,6.28)",
   "text": "",
   "pv": {
    "g0:omega": -5.85
   }
  },
  {
   "id": 37,
   "x": 40,
   "y": 6138,
   "kind": "text",
   "latex": "",
   "text": "六、三维与场"
  },
  {
   "id": 38,
   "x": 40,
   "y": 6171,
   "kind": "text",
   "latex": "",
   "text": "曲面用同心水波更直观：sin(√(x²+y²)) 一眼就是立体的；热力图换成棋盘格 sin(x)·cos(y) —— 亮暗相间一眼看懂。"
  },
  {
   "id": 39,
   "x": 40,
   "y": 6204,
   "kind": "math",
   "latex": "surf(\\sin\\left(\\sqrt{x\\text{\\textasciicircum}^{2}+y\\text{\\textasciicircum}^{2}}\\right),-8,8)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "xlabelSize": 11,
    "ylabelSize": 11,
    "tickSize": 11,
    "legendPos": "",
    "legendSize": 11,
    "xmin": "",
    "xmax": "",
    "ymin": "",
    "ymax": "",
    "xlog": false,
    "ylog": false,
    "axes": true,
    "xaxisPos": "edge",
    "yaxisPos": "edge",
    "colorscale": "Jet",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "",
    "bins": "",
    "w": 560,
    "h": 300,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": []
   }
  },
  {
   "id": 40,
   "x": 40,
   "y": 6679,
   "kind": "math",
   "latex": "contour(a\\times x\\text{\\textasciicircum}^2+b\\times y\\text{\\textasciicircum}^2,-2,2)",
   "text": "",
   "pv": {
    "g0:a": -4.12,
    "g0:b": -7.58
   }
  },
  {
   "id": 41,
   "x": 40,
   "y": 7113,
   "kind": "math",
   "latex": "heatmap(\\sin(x)\\cdot\\cos(y),-6,6)",
   "text": ""
  },
  {
   "id": 42,
   "x": 40,
   "y": 7547,
   "kind": "math",
   "latex": "quiver(-y,x,-2,2)",
   "text": ""
  },
  {
   "id": 43,
   "x": 40,
   "y": 7901,
   "kind": "text",
   "latex": "",
   "text": "提示：数据处理的图（直方图 hist、频谱 plot(fft(…))）见 信号变换示例；图像处理相关见 图像处理示例。"
  },
  {
   "id": 44,
   "x": 40,
   "y": 7934,
   "kind": "text",
   "latex": "",
   "text": "七、三维曲面上的参数滑块"
  },
  {
   "id": 45,
   "x": 40,
   "y": 7967,
   "kind": "text",
   "latex": "",
   "text": "3D 曲面、热力图、等值线、饼图、极坐标、散点……所有图型都一样：拖 a、b 看曲面怎么变形（多张曲面之间同名参数同样各自动，也能用链子挂到一起）。"
  },
  {
   "id": 47,
   "x": 57,
   "y": 8560,
   "kind": "math",
   "latex": "heatmap(a\\cdot x\\text{\\textasciicircum}^{2}+b\\cdot y\\text{\\textasciicircum}^{2}+c,-3,3,60)",
   "text": "",
   "pv": {
    "g0:a": -5.39,
    "g0:b": -3.81,
    "g0:c": -0.79
   }
  },
  {
   "id": 52,
   "x": 276,
   "y": 172,
   "kind": "math",
   "latex": "yb\\coloneqq\\,\\begin{bmatrix}2\\\\ 4\\\\ 3\\\\ 5\\\\ 6\\\\ 7\\\\ 7\\\\ 9\\end{bmatrix}",
   "text": ""
  },
  {
   "id": 61,
   "x": 74,
   "y": 1186,
   "kind": "math",
   "latex": "f\\left(x\\right)\\coloneqq\\,a\\times x\\text{\\textasciicircum}^2+b\\times x+c",
   "text": ""
  },
  {
   "id": 65,
   "x": 63,
   "y": 1353,
   "kind": "math",
   "latex": "plot\\left(f\\left(x\\right);g\\left(x\\right);wavetest\\left(x\\right)\\right)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "xlabelSize": 11,
    "ylabelSize": 11,
    "tickSize": 11,
    "legendPos": "",
    "legendSize": 11,
    "xmin": "-10",
    "xmax": "10",
    "ymin": "-10",
    "ymax": "10",
    "xlog": false,
    "ylog": false,
    "axes": true,
    "xaxisPos": "zero",
    "yaxisPos": "zero",
    "colorscale": "",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "",
    "bins": "",
    "w": 560,
    "h": 300,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": []
   },
   "pv": {
    "g0:a": 1.63,
    "g0:b": 0.86,
    "g1:a": 1.44,
    "g2:A": 2.59,
    "g2:k": 0.86,
    "g2:omega": 8.74,
    "g2:varphi": 1.63
   }
  },
  {
   "id": 66,
   "x": 382,
   "y": 1181,
   "kind": "math",
   "latex": "g\\left(x\\right)\\coloneqq\\,a\\times x",
   "text": ""
  },
  {
   "id": 67,
   "x": 69,
   "y": 1255,
   "kind": "math",
   "latex": "wavetest\\left(x\\right)\\coloneqq\\,A\\times sin\\left(\\omega\\times x+\\varphi\\right)+k",
   "text": ""
  },
  {
   "id": 74,
   "x": 616,
   "y": 5781,
   "kind": "math",
   "latex": "polar(A\\sin(\\omega\\times t+\\varphi)+k,0,6.28)",
   "text": "",
   "pv": {
    "g0:omega": 11.5,
    "g0:A": -5.58,
    "g0:k": -5.01,
    "g0:varphi": -2.32
   },
   "pr": {
    "g0:A": {
     "min": -10,
     "max": 10,
     "step": 0.01
    },
    "g0:k": {
     "min": -10,
     "max": 10,
     "step": 0.01
    },
    "g0:omega": {
     "min": -20,
     "max": 20,
     "step": 0.01
    },
    "g0:varphi": {
     "min": -10,
     "max": 10,
     "step": 0.01
    }
   }
  },
  {
   "id": 97,
   "x": 51,
   "y": 8037,
   "kind": "math",
   "latex": "surf(\\sin\\left(\\sqrt{a\\times x\\text{\\textasciicircum}^2+b\\times y\\text{\\textasciicircum}^2}\\right),-8,8)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "xlabelSize": 11,
    "ylabelSize": 11,
    "tickSize": 11,
    "legendPos": "",
    "legendSize": 11,
    "xmin": "",
    "xmax": "",
    "ymin": "",
    "ymax": "",
    "xlog": false,
    "ylog": false,
    "zmin": "",
    "zmax": "",
    "axes": true,
    "xaxisPos": "edge",
    "yaxisPos": "edge",
    "colorscale": "Jet",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "200",
    "bins": "",
    "w": 770,
    "h": 320,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": []
   },
   "pv": {
    "g0:a": 6.41,
    "g0:b": 4.19
   }
  },
  {
   "id": 109,
   "x": 846,
   "y": 234,
   "kind": "math",
   "latex": "fd\\left(x\\right)\\coloneqq\\,\\left\\{\\begin{array}{l}x\\text{\\textasciicircum}^2,x>0\\\\ -x,x\\le0\\end{array}\\right.",
   "text": ""
  },
  {
   "id": 112,
   "x": 62,
   "y": 9057,
   "kind": "math",
   "latex": "f\\left(x,y,z\\right)\\coloneqq\\,\\left\\{\\begin{array}{l}1,x\\text{\\textasciicircum}^2+\\left(y-k\\right)\\text{\\textasciicircum}^2+z\\text{\\textasciicircum}^2\\le1\\\\ 0,x\\text{\\textasciicircum}^2+\\left(y-k\\right)\\text{\\textasciicircum}^2+z\\text{\\textasciicircum}^2\\ge1\\end{array}\\right.",
   "text": ""
  },
  {
   "id": 113,
   "x": 60,
   "y": 9142,
   "kind": "math",
   "latex": "surf\\left(f\\left(x,y,z\\right)\\right)",
   "text": "",
   "style": {
    "dash": "solid",
    "width": 2,
    "color": "#185FA5",
    "marker": "none",
    "msize": 6,
    "grid": true,
    "box": true,
    "title": "",
    "xlabel": "",
    "ylabel": "",
    "titleSize": 14,
    "titleColor": "#1a1a1a",
    "xlabelSize": 11,
    "xlabelColor": "#1a1a1a",
    "ylabelSize": 11,
    "ylabelColor": "#1a1a1a",
    "tickSize": 11,
    "tickColor": "#3a4550",
    "legendPos": "",
    "legendSize": 11,
    "gridColor": "#e8ebee",
    "axisColor": "#b9c0c7",
    "xmin": "-2",
    "xmax": "2",
    "ymin": "-2",
    "ymax": "2",
    "xlog": false,
    "ylog": false,
    "zmin": "",
    "zmax": "",
    "axes": true,
    "xaxisPos": "edge",
    "yaxisPos": "edge",
    "originColor": "#000000",
    "colorscale": "",
    "levels": 10,
    "labels": true,
    "barw": 0.6,
    "invert": false,
    "chartType": "",
    "barmode": "group",
    "bargap": -0.2,
    "barline": "",
    "points": "32",
    "bins": "",
    "w": 910,
    "h": 550,
    "page": "",
    "mrow": 6,
    "mcol": 6,
    "paperbg": "#ffffff",
    "plotbg": "#ffffff",
    "exportScale": 2,
    "channel": "auto",
    "imgfit": "contain",
    "interp": "smooth",
    "azimuth": 1.3,
    "elevation": 0.6,
    "fill": false,
    "fillalpha": "",
    "series": [
     {
      "cmap": "Portland"
     }
    ],
    "legendBg": "rgba(255,255,255,.78)",
    "legendBd": "#d7dce2",
    "pcalpha": 0.05,
    "pcfollow": true
   },
   "pv": {
    "g0:z": 7.84,
    "g0:k": 0.18
   },
   "pr": {
    "g0:z": {
     "min": -10,
     "max": 10,
     "step": 0.01
    },
    "g0:k": {
     "min": -3,
     "max": 3,
     "step": 0.01,
     "set": 1
    }
   },
   "p3": "g0:z"
  }
 ]
}
