# Exports

Exports aim to provide a consistent generation of images of your results. For example if you record the trace your algorithm walks on the `Sphere`

`(2)`

, you yan easily export this trace to a rendered image using `asyExportS2Signals`

and render the result with Asymptote. Despite these, you can always record values during your iterations, and export these, for example to `csv`

.

## Asymptote

The following functions provide exports both in graphics and/or raw data using Asymptote.

`Manopt.renderAsymptote`

— Function.`renderAsymptote(filename, exportFct=missing; render=4, format="png", ...)`

render an exported `asy`

. The export function can be provided but might also be infered by the optional arguments, i.e. type of `data`

(or `curves`

, `points`

and `tVectors`

) provided.

**Input**

`filename`

– filename of the exported`asy`

and rendered image`exportFct`

: (`missing`

) a function creating an`asy`

file with`kwargs`

as optional arguments and the`filename`

string as its only mandatory argument. If this function is not given, we infere it from kwargs, i.e.`data`

indicates that`asyExportXData`

is used.`points`

,`curves`

or`tVectors`

indicate, that`asyExportS2Signals`

is infered.

**Keyword Arguments**

the default values are given in brackets

`render`

– (`4`

) render level of asymptote, i.e. its`-render`

option`format`

– (`"png"`

) final rendered format, i.e. asymptote's`-f`

option

all further keyword arguments are passed down to the `exportFct`

call.

**See also**

## Exports for specific Manifolds

`Manopt.asyExportS2Signals`

— Function.`asyExportS2Signals(filename; points, curves, tVectors, colors, options...)`

Export given `points`

, `curves`

, and `tVectors`

on the sphere $\mathbb S^2$ to Asymptote.

**Input**

`filename`

– a file to store the Asymptote code in.

**Optional Arguments (Data)**

`colors`

- dictionary of color arrays (indexed by symbols`:points`

,`:curves`

and`:tvector`

) where each entry has to provide as least as many colors as the length of the corresponding sets.`curves`

– an`Array`

of`Arrays`

of`SnPoints`

where each inner array is interpreted as a curve and is accompanied by an entry within`colors`

`points`

– an`Array`

of`Arrays`

of`SnPoints`

where each inner array is itnerpreted as a set of points and is accompanied by an entry within`colors`

`tVectors`

– an`Array`

of`Arrays`

of extended`SnTVector`

s (`TVectorE{SnTVector}`

) where each set of vectors is accompanied by an entry from within`colors`

**Optional Arguments (Asymptote)**

`arrowHeadSize`

- (`6.0`

) size of the arrowheads of the tangent vectors`cameraPosition`

- (`(1., 1., 0.)`

) position of the camera in the Asymptote szene`lineWidth`

– (`1.0`

) size of the lines used to draw the curves.`lineWidths`

– overrides the previous value to specify a value per curve and tVector set.`dotSize`

– (`1.0`

) size of the dots used to draw the points.`dotSizes`

– overrides the previous value to specify a value per point set.`sphereColor`

– (`RGBA{Float64}(0.85, 0.85, 0.85, 0.6)`

) color of the sphere the data is drawn on`sphereLineColor`

– (`RGBA{Float64}(0.75, 0.75, 0.75, 0.6)`

) color of the lines on the sphere`sphereLineWidth`

– (`0.5`

) line width of the lines on the sphere`target`

– (`(0.,0.,0.)`

) position the camera points at

`Manopt.asyExportS2Data`

— Function.`asyExportS2Data(filename)`

Export given `data`

as a point on a `Power{SnPoint}`

manifold, i.e. one-, two- or three-dimensional data with points on the `Sphere`

`(2)`

$\mathbb S^2$.

**Input**

`filename`

– a file to store the Asymptote code in.

**Optional Arguments (Data)**

`data`

– a`PowPoint`

representing the 1-,2-, or 3-D array of`SnPoints`

`elevationColorScheme`

- A`ColorScheme`

for elevation`scaleAxes`

- (`(1/3,1/3,1/3)`

) move spheres closer to each other by a factor per direction

**Optional Arguments (Asymptote)**

`arrowHeadSize`

- (`1.8`

) size of the arrowheads of the vectors (in mm)`cameraPosition`

- position of the camrea (default: centered above xy-plane) szene`target`

- position the camera points at (default: center of xy-plane within data).

`Manopt.asyExportSPDData`

— Function.`asyExportSPDData(filename)`

export given `data`

as a point on a `Power{SPDPoint}`

manifold, i.e. one-, two- or three-dimensional data with points on the manifold of symmetric positive definite matrices.

**Input**

`filename`

– a file to store the Asymptote code in.

**Optional Arguments (Data)**

`data`

– a`PowPoint`

representing the 1-,2-, or 3-D array of`SPDPoints`

`colorScheme`

- A`ColorScheme`

for Geometric Anisotropy Index`scaleAxes`

- (`(1/3,1/3,1/3)`

) move symmetric positive definite matrices closer to each other by a factor per direction compared to the distance esimated by the maximal eigenvalue of all involved SPD points

**Optional Arguments (Asymptote)**

`cameraPosition`

- position of the camrea (default: centered above xy-plane) szene.`target`

- position the camera points at (default: center of xy-plane within data).

Both values `cameraPosition`

and `target`

are scaled by `scaledAxes*EW`

, where `EW`

is the maximal eigenvalue in the `data`

.