> For the complete documentation index, see [llms.txt](https://applied-physics.gitbook.io/warp-factory/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://applied-physics.gitbook.io/warp-factory/modules/visualizer-module/plottensor.md).

# 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.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://applied-physics.gitbook.io/warp-factory/modules/visualizer-module/plottensor.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
