> 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/plot-functions.md).

# Plot Functions

## Extended Plotting Functions

Certian standard MATLAB functions are wrapped into a special call to better handle 4D data for the user.

<table><thead><tr><th width="125.33333333333331">Function</th><th width="232">Extension</th><th>Example</th></tr></thead><tbody><tr><td><code>plotq</code></td><td>Extends <a href="https://www.mathworks.com/help/matlab/ref/plot.html">plot</a> function by applying a <a href="https://www.mathworks.com/help/matlab/ref/squeeze.html">squeeze</a> to remove all array dimensions equal to 1</td><td><code>plotq(</code><mark style="color:purple;"><code>data(1,:,end/2,end/2)</code></mark><code>)</code></td></tr><tr><td><code>surfq</code></td><td>Extends <a href="https://www.mathworks.com/help/matlab/ref/surf.html">surf</a> function by applying a <a href="https://www.mathworks.com/help/matlab/ref/squeeze.html">squeeze</a> to remove all array dimensions equal to 1. Note this automatically applies the custom colormap of <code>redblue</code>.</td><td><code>surfq(</code><mark style="color:purple;"><code>data(1,:,:,end/2)</code></mark><code>)</code></td></tr></tbody></table>

## Display Functions

For displaying metric and stress-energy values, some unique functions are built into Warp Factory to help users.

<table><thead><tr><th width="273.3333333333333">Function</th><th width="272">Extension</th><th>Example</th></tr></thead><tbody><tr><td><code>redblue(</code><mark style="color:blue;"><code>data</code></mark><code>, </code><mark style="color:orange;"><code>gradientNum</code></mark><code>)</code></td><td>Custom <a href="https://www.mathworks.com/help/matlab/colors-1.html">colormap </a>function which takes in <mark style="color:blue;"><code>data</code></mark>and optional <mark style="color:orange;"><code>gradientNum</code></mark> to return a smooth mapping of red colors for negative values and blue colors for positive values. The <mark style="color:orange;"><code>gradientNum</code></mark> defines the resolution of the color scale, <strong>defaults to 1024.</strong></td><td><code>redblue(</code><mark style="color:purple;"><code>data</code></mark><code>)</code></td></tr></tbody></table>


---

# 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/plot-functions.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.
