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