Plot

From Wikisophia
Revision as of 03:31, 26 May 2011 by Claire (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Wikitex Plot is a class of Wikitex.

Gnuplot by Hans-Bernhard Broeker, et al.; for plotting two- and three-dimensional line, point, dot, box, histogram graphs or vector fields (doc | template).

Contents

Graph of a function

The wikitext:

<plot>set samples 500
plot [-3:3][-10:10] 5*sin(3*x)+2*sin(23*x)</plot>

produces the displayed graph.

Plot 3D

Mandelbrot set

<plot>
# original from TANAKA Masaki
# masaki@isea.is.titech.ac.jp(Tokyo Institute of technology)
set pm3d at s solid
set palette rgb 7,5,15 
unset colorbox 
unset surface
set ticslevel 0
set mapp cart
set size square
set view 45,10,1,1
set auto
set isosamples 100,100
compl(a,b)=a*{1,0}+b*{0,1}  
mand(z,a,n) = n<=0 || abs(z)>2 ? 1:mand(z*z+a,a,n-1)+1
splot [-2:1][-1.5:1.5] mand({0,0},compl(x,y),50) 
</plot>

Another example

<amsmath>\frac{\sin\left(\sqrt{x^2+y^2}\right)}{\sqrt{x^2+y^2}}:</amsmath>
<plot>
set border 4095 lt -1 lw 1.000
set view 130, 10, .5
set samples 50, 50
set isosamples 50, 50
unset surface
unset colorbox
set pm3d at s
set pm3d scansbackward flush begin noftriangles nohidden3d implicit corners2color mean
splot sin(sqrt(x**2+y**2))/sqrt(x**2+y**2)
</plot>

Julia set

<plot>
set pm3d at s solid
set palette rgb -6,-15,-7
unset colorbox 
set ticslevel 0
unset ztics
unset surface
set samples 70
set isosamples 70,70
complex(x,y)=x*{1,0}+y*{0,1}
mandel(x,y,z,n) = (abs(z)>2.0 || n>=1000)? log(n): mandel(x,y,z*z+complex(x,y),n+1)
a=-0.38
b=-0.612
set multiplot
set origin 0,0
set size 0.55,0.77
splot [-0.5:0.5][-0.5:0.5] mandel(a,b,complex(x,y),0)     
set origin 0.35,-0.15
set size 0.7,0.96
set view 0,0,,,
splot [-0.5:0.5][-0.5:0.5] mandel(a,b,complex(x,y),0)
</plot>

WikiTeX failure:
5, Fault 1: 'class 'modtex.execution.ExecutionError':(70, '"plot.gp", line 23: recursion depth limit exceeded

')'

Figure-8 Klein bottle

<plot>
x(u,v)= cos(u)*(cos(u/2)*cos(v)+sin(u/2)*sin(2*v)+3.0)
y(u,v)= -sin(u)*(cos(u/2)*cos(v)+sin(u/2)*sin(2*v)+3.0)
z(u,v)= -sin(u/2)*cos(v)+cos(u/2)*sin(2*v)  
set pm3d explicit
set palette rgb 3,7,9
unset colorbox
set parametric
set hidden3d
set ticslevel 0
unset key
set isosamples 40,40
set view 65,70,1,1
set urange[-0.5*pi:1.5*pi]
set vrange[-pi:pi]
set zrange[-2:2]
set multiplot
splot x(u,v),y(u,v),z(u,v) w pm3d
splot x(u,v),y(u,v),z(u,v) lt 6
</plot>

hopkins vs pascal cotto vs margarito chavez vs zbik Pandaranol Minecraft