 Overview  Gallery  Introduction  Objects  Packages  Packages 3D  Basic Options  3D Options  Advanced

## 3. Working with Graphics Packages

### Standard

The built-in commands in 2D allow to render function graphs and parametrized planar curves.

#### Function Graph

 Graph of a sin curve. In:= p1 = Plot[3Sin[t], {t, -Pi, Pi}] In:= JavaView[p1] Compare with Mathematica

#### 2D Curves

 Parametrized planar curve. In:= p2 = ParametricPlot[{Cos[5t], Sin[3t]}, {t, 0, 2Pi}, AspectRatio -> Automatic]; In:= JavaView[p2] Compare with Mathematica

### Graphics`ComplexMap`

 This plots the image of a complex function for a given domain. In:= << Graphics`ComplexMap`In:= pm = PolarMap[Exp, {0, 4, 1/4}, {Pi/2, Pi, Pi/16}]; In:= JavaView[pm] Compare with Mathematica

### Graphics`FilledPlot`

 This specifies which curves to fill between and the colors of the filled regions. In:= << Graphics`FilledPlot`In:= fp = FilledPlot[{Exp[-x], Cos[x], Sin[x]}, {x, 0, 2 Pi}, Fills -> {{{1, Axis}, RGBColor[1, 0, 0]}, {{3, 2}, RGBColor[0, 0, 1]}}, Curves -> Front] In:= JavaView[fp] Compare with Mathematica

### Graphics`Graphics`

 This plots an ellipse and a limacon on the same graph. In:= <

### Graphics`ImplicitPlot`

 This plots an ellipse using the Solve method. In:= <

### Graphics`Legend`

 This shows sine and cosine curves with a legend. JavaView fails : Graphics inside a rectangle command are not parsed. Not supported yet. In:= < {GrayLevel, Dashing[{.03}]}, PlotLegend -> {"Sine", "Cosine"}]; In:= JavaView[l] Compare with Mathematica

### Graphics`MultipleListPlot`

 This shows two sets of points, displayed as little stars. JavaView fails : MultipleListPlot makes intense use of Offset, which is not supported. In:= < True] In:= JavaView[mlpp] Compare with Mathematica

### Graphics`PlotField`

Draws two-dimensional vector fields on a planar domain.

 The two components of this vector field are given by sin(x) and cos(y). In:= <

### Miscellaneous`WorldPlot`

 This will show a map of Africa. In:= < Sinusoidal] In:= JavaView[a] Compare with Mathematica

### DiscreteMath`Combinatorica`

#### Showing Graphs

This packages provides the Graph object which consists of a set of vertices and its adjacency matrix. Several commands produce and modify such graphs.

The command ShowGraph[] converts a Graph object in a Graphics object containing points and lines as a set of separate graphics primitives.

The adjacency matrix is stored in full size in the Graph object.

JavaView receives a graph as two separate geometries, a point set and a polygon set. The point set is obsolete if the the vertices of the polygon set are made visible.

JavaView[sg]
 In:= <

### DiscreteMath`ComputationalGeometry`

 Plot of the Voronoi diagram of given points. In:= <

### DiscreteMath`Tree`

 This shows a graphical representation of a tree with 10 nodes. In:= <