GitXplorerGitXplorer
a

matplotlib-Mathematica_style_wrapper

public
1 stars
0 forks
0 issues

Commits

List of commits on branch master.
Verified
8018d10e8f55b41a8d6cb063d26c3a1062afa1ec

Update README.md

committed 5 years ago
Verified
547edefa8f92b7e190383ca4f9c54c9f3ab8f613

v1.0 !

committed 5 years ago
Verified
e9575403b8afac5f2ff5a951c7061d225bde8b12

Update README.md

committed 5 years ago
Verified
237a76bfa70e2344b1d99a7daf51a65824c0c184

Update matplotlib_in_Mathematica.py

committed 5 years ago
Verified
8e737d616854686b3d90f482e5eceac325b9f152

升级语法

committed 5 years ago
Verified
be5ae6d2cc3fd8d1b9683d93cd36eae8e18b2a44

Add files via upload

committed 5 years ago

README

The README file for this repository.

matplotlib_in_Mathematica

简单封装了一个库,实现了 Mathematica 绘图的部分选项。


目前实现的函数

  1. Plot
  2. DiscretePlot3D
  3. Transpose
  4. ListPlot3D
  5. ListLinePlot
  6. ListPlot
  7. Range
  8. Transpose
  9. Plot3D
  10. PolarPlot
  11. ParametricPlot
  12. ParametricPlot3D
  13. ContourPlot
  14. ContourPlot3D

选项

2D 直角坐标 Rect

  1. PlotRange
  2. PlotLabel
  3. AxesLabel
  4. GridLines

3D Rect

  1. PlotRange
  2. PlotLabel
  3. AxesLabel
  4. GridLines

2D Polar

  1. PlotRange
  2. PlotLabel
  3. AxesLabel

Example

ContourPlot3D(lambda x, y, z: x**2+y**2+z**2-2,    (0, 2, 10), (0, 2, 10), (0, 2, 10))
Plot(lambda y: Sin(y), (0, 2*Pi, 200))
ParametricPlot([lambda x:Sin(x), lambda y: Cos(y)], (0, 7, 70))
Plot3D([lambda x, y: Sin(x+y), lambda m, n:m+n],  (-5, 5, 100), (-4, 4,100),     PlotRange=(-3, 3), PlotLabel="tan(x)", AxesLabel=("x", "y", "z"))
ListPlot3D([[1, 1, 2], [3, 5, 8], [1, 3, 4]], PlotRange=(-4, 4))
ListPlot([[1, 1],  [3, 5],   [1, 3]])
ListPlot([1, 2, 3, 4, 5])
DiscretePlot3D(lambda x, y: Sin(x+y), (-5, 5, 100),  (-5, 5, 100))
PolarPlot([lambda t: Sin(t), lambda u:Cos(u)],   (0, 2*Pi, 100))
Plot([lambda x: Sin(x)], (0, 2*Pi, 100), PlotRange=(-4, 4), GridLines=True)
ParametricPlot(((lambda x: Sin(x), lambda y: Cos(y)), [lambda u: Sin(3*u), lambda v:Cos(1 * v)]),(0, 6*Pi, 300))
ParametricPlot(
   [
      [lambda r, t: r*Cos(t), lambda r, t: (1-r)*Sin(t)]
    ], [0, 2*Pi, 100], [0, 1,100], PlotLabel="模仿 Mathematica"
)
ParametricPlot3D([lambda t:t,lambda t: 2*t,lambda t: 3*t],[0,2,100])
ParametricPlot3D([
   [lambda t,u:t+u, lambda t,u: 2*t+u, lambda t,u: 3*t-u],    [lambda t, u:t, lambda t,u: 5*t, lambda t,u: 3*t]]
   [0, 2, 100],[0,2,100])
ParametricPlot3D([
  [lambda u, v: Cos(u),
          lambda u, v: Sin(u)+Cos(v),
          lambda u, v: Sin(v)],
        [lambda u, v:u+v, lambda u, v: u-v, lambda u, v: u+2*v]],
         [0, 2*Pi, 100], [-Pi, Pi, 100],
        PlotLabel="Mathematica", AxesLabel=["x", "y", "z"])
ContourPlot([lambda x, y: x+y-5, lambda x, y: x **
                 2+y**2-5], (-4, 4, 50), (-4, 4, 50))