"xyPlot".
Implementation
Plot Parameters
| Parameter | Format | Example | Description |
|---|---|---|---|
| xData | 1xn Array | remote.plot.x | Array of x values against which to plot all yData |
| yData | mxn Matrix | remote.plot.V | Matrix of y values to plot. Each row is a new line to plot |
| yEnvelopeData | 2xn Matrix | remote.plot.VEnv | (optional) Matrix in which one row is the minimum and the other row is the maximum in an envelope. Space between the lines will be filled with a light grey |
| yLabels | 1xn array of strings | remote.plot.lc | (optional) Labels for each line / row in yData |
| yColors | 1xn array of strings | ["#3DB318"] | (optional) Colours, in hex format, to use for each line / row in yData |
| yAxisLabel | string | "Shear (kN)" | (optional) String with which to label the y axis |
| xAxisLabel | string | "Distance from Left (mm)" | (optional) String with which to label the x axis. No label will display if this parameter is excluded |
| height | integer | 200 | (optional: defaults to 200) Height, in pixels, of the plot |
| column | boolean | true | (optional; defaults to false) Rotates the plot 90 degrees and arranges legends and axes to fit appropriately, generally used for plotting column data |
| minScale | float | 0.01 | (optional; defaults to 0.01) Sets a minimum absolute scale to plot, so that plots don’t give ugly NaN values or start zooming in so much that they start showing floating point precision |
| xScale | string | "log" | (optional; defaults to "linear") Options are "linear", "log", "sqrt", and "time". See Victory Documentation |
| yScale | string | "log" | (optional; defaults to "linear") Same as xScale, but for the Y-axis |
| xAxisValues | array | [1, 10, 100, 1000, 10000] | (optional; defaults to [], which means automatic) If Victory seems to be coming up with weird axis values, you can manually set it here |
| yAxisValues | array | [1, 10, 100, 1000, 10000] | (optional; defaults to [], which means automatic) If Victory seems to be coming up with weird axis values, you can manually set it here |
| customLines | dict | xsect.lines | Format: [{"points": [[x0, y0], [x1, y1], ...], "color": "#000", "lineWeight": 3, "name": "Global"},{"points":...}] |
| legendItemsPerRow | integer | 5 | Format: Number of items to show per row of the legend |
Basic Data Format
Single Line Plot
Multiple Line Plot
Envelope Plots
Envelope plots show a range of values with shaded areas:Custom Lines
Add custom reference lines or annotations:Scale Options
Logarithmic Scales
Square Root Scale
Column Mode
For vertical data presentation:Complete Example
Best Practices
- Data Structure: Always format
yDataas a matrix, even for single lines - Colors: Use consistent color schemes across related diagrams
- Labels: Provide clear axis labels and units
- Scale Selection: Choose appropriate scales for your data range
- Performance: Use
minScaleto avoid precision issues with very small values
The XY Plot uses the Victory.js charting library. For advanced scaling options, refer to the Victory Documentation.
Use envelope plots to show uncertainty ranges or to highlight the difference between maximum and minimum values in load combinations.
When using logarithmic scales, ensure that all data points are positive. Zero or negative values will cause rendering issues.