@@ -29,14 +29,40 @@ title: Cool 2D Plot
2929code : plot(x * sin(x), (x, -10, 10))
3030descr : Plot of $f(x) = x \sin(x)$.
3131---
32+ title : Lines
33+ code : |
34+ line([(0,0), (1,2), (1/2,pi), (1/2,pi/2)], color='darkgreen', thickness=3)
35+ ---
36+ title : 2D Polygons
37+ code : |
38+ a = polygon2d([(0,0), (1,2), (1/2,pi), (1/2,pi/2)], color='orange')
39+ b = polygon2d([(0,0), (1,2), (1/2,pi), (1/2,pi/2)], color='black', fill=False, thickness=3)
40+ show(a + b)
41+ ---
42+ title : Parametric Plots
43+ code : |
44+ parametric_plot([cos(x) + 2*cos(x/4), sin(x) - 2*sin(x/4)], (x,0,8*pi), color='green', thickness=3, fill = True)
45+ ---
46+ title : Random Walk
47+ code : |
48+ stats.TimeSeries(1000).randomize('normal').sums().plot()
49+ ---
50+ title : Text
51+ code : |
52+ text(r"Text and LaTeX: $\\alpha^3 + 1$", (1,1), color="black", fontsize=15, rotation=30)
53+ ---
54+ title : Points
55+ code : |
56+ show(points([(1,0), (sqrt(2)/2,sqrt(2)/2), (0,1), (1/2,1/2)], color='darkgreen', pointsize=50), aspect_ratio=1)
57+ ---
58+ category : Plotting/3D
59+ ---
3260title : Simple 3D Plot
3361code : |
3462 var('x y')
3563 plot3d(sin(x) * cos(y), (x, -10, 10), (y, -10, 10))
3664descr : 3D plot of $f(x,y) = \sin(x)\cos(y)$.
3765---
38- category : Plotting/3D
39- ---
4066title : " Cube"
4167descr : " Show a colored cube"
4268code : |
0 commit comments