# plotTensor

## Description

A function that plots slices of the tensor objects.

## Method

Selects data from the spacetime plane and plots a surface for all unique terms of the tensor passed in.

## Syntax

`plotTensor(`<mark style="color:blue;">`tensor`</mark>`,`` `<mark style="color:orange;">`alpha`</mark>` ``,`<mark style="color:orange;">`slicedPlanes`</mark>`,`` `<mark style="color:orange;">`sliceLocations`</mark>`)`

### Input Arguments

{% hint style="info" %} <mark style="color:blue;">blue</mark> are required inputs.

<mark style="color:orange;">orange</mark> are optional inputs with native default values.
{% endhint %}

<table><thead><tr><th width="191">Inputs</th><th width="112">Format</th><th width="97">Type</th><th>Description</th></tr></thead><tbody><tr><td><mark style="color:blue;"><code>tensor</code></mark> </td><td>struct</td><td>object</td><td>Input metric tensor object. <strong>Must be a "metric" or "stress-energy" type.</strong> </td></tr><tr><td><mark style="color:orange;"><code>alpha</code></mark></td><td>1x1 array</td><td>double</td><td>The alpha scale of the surface grid, ranges from 0 to 1. <strong>The default value is 0.2.</strong></td></tr><tr><td><mark style="color:orange;"><code>slicedPlaned</code></mark> </td><td>1x2 array</td><td>double</td><td>Select the two dimensions to slice along, where the dimensions are from 0 to 1. <strong>The default value is [1, 4].</strong></td></tr><tr><td><mark style="color:orange;"><code>sliceLocation</code></mark></td><td>1x2 array</td><td>double</td><td>Selects the center value of the midPlane. <strong>The default value is half of the grid size of the tensor dimensions specified in </strong><mark style="color:orange;"><strong><code>slicedPlanes</code></strong></mark>.</td></tr></tbody></table>

### Output Arguments

No data outputs. Generates figures with the plotting data.
