csv2graph Sample Gallery
This gallery lets you explore the main csv2graph options with real sample data. Reproduce the sample directory layout shown in each section and you can run the commands exactly as written.
Every sample's CSV file is available for direct download on this page. Pre-rendered images and helper scripts are included when they add context.
Sample 1: Basic Overlay Only
This minimal example plots XRD intensity data and uses --no-individual so that only the overlay image is produced (pass --individual to force per-series images even on single-series CSVs).
Data Overview
The dataset emulates XRD intensity measurements.
1 2 3 4 5 6 7 8 9 10 | |

Directory Layout
1 2 3 4 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 | |
1 | |
Option Details
no_individual=True,--no-individual: Skip individual plots and emit only the overlay image.
Sample 2: Log-Scale Y Axis
This sample uses synthetic diode I-V data to show how --logy plots the Y axis on a logarithmic scale while setting a custom title.
Data Overview
The dataset approximates the I-V characteristics of a diode.
1 2 3 4 5 6 7 8 9 10 | |

Directory Layout
1 2 3 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 | |
Option Details
no_individual=True,--no-individual: Skip individual plots and emit only the overlay image.--logy/logy=True: Plot the Y axis on a logarithmic scale.
The sample dataset does not cover logarithmic X axes, but you can enable it with
--logx/logx=True.
Sample 3: Axis Inversion (X/Y)
This example demonstrates --invert-x and --invert-y using XRD data.
Data Overview
The dataset emulates XRD intensity measurements.
1 2 3 4 5 6 7 8 9 10 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 | |
Inverting the X Axis
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 12 | |
1 | |
Inverting the Y Axis
1 2 3 4 5 6 7 8 9 10 11 | |
1 | |
Option Details
invert_x=True,--invert-x: Flip the overlay horizontally.invert_y=True,--invert-y: Flip the overlay vertically.no_individual=True: Skip individual plots and emit only the overlay image.
Sample 4: Overlaying Multiple X/Y Pairs
This sample plots three joint torque signals by pairing multiple X and Y columns and exports both the overlay and per-series plots.
Data Overview
Synthetic three-joint (J1-J3) angle/velocity/torque data generated from near-monotonic angles with a linear model plus small noise.
1 2 3 4 5 6 | |




Directory Layout
Before running the sample, the directory contains:
1 2 3 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
1 2 3 4 5 | |
Option Details
--mode overlay: Overlay all series in a single figure (equivalent to the legacy x1y1x2y2 mode).--x-col 1 --x-col 4 --x-col 7: Specify three X columns (0-based indices 1, 4, 7). Each pairs with the corresponding Y column below.--y-cols 0 --y-cols 3 --y-cols 6: Specify the matching Y columns (indices 0, 3, 6) to form three series.--title "Angle-Dependent Torque": Set the plot title and filename stem.
Sample 5: One X Column with Many Y Series
This Raman spectroscopy example pairs one X column with multiple Y series and customises the plot title.
Data Overview
Dummy Raman spectroscopy data. The horizontal axis is Raman Shift (cm^-1) and the Y series represent Intensity (counts) at positions Pos0-Pos10.
1 2 3 4 5 6 7 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
1 2 3 4 5 | |
Option Details
--x-col 0: Use column 0 for the X axis. One declaration automatically pairs it with all specified Y columns.--y-cols 1 ... 5: Plot five Y series (columns 1-5).--no-individual: Output only the combined plot and skip individual PNGs.--title: Provide a custom plot title.
Sample 6: Limiting Legend Entries
This Raman spectroscopy sample caps the number of legend items via --max-legend-items.
Data Overview
Dummy Raman spectroscopy data with Raman Shift (cm^-1) on the X axis and Intensity (counts) for positions Pos0-Pos10.
1 2 3 4 5 6 7 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
1 2 3 4 5 | |
Option Details
--x-col 0: Use column 0 for the X axis so every declared Y column automatically pairs with it.--y-cols ...: Enumerate the five Y series (columns 1-5).--no-individual: Produce only the combined overlay PNG and skip per-series PNGs.--max-legend-items 3: Show at most three legend entries; remaining items are hidden to keep the plot readable.
Sample 7: Multi-Channel Charge/Discharge Overlay
This advanced example colours series by state labels spread across multiple columns while redirecting the output directory.
No pre-rendered images are bundled with this sample. Run the code to generate outputs.
Data Overview
The dataset mimics multi-channel charge/discharge measurements.
1 2 3 4 | |
How to Run
Switch between the Python script and CLI examples using the tabs below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
1 2 3 4 5 6 7 8 | |
Option Details
--output-dir ./custom_output: Store generated PNG/HTML outputs in a custom folder instead of alongside the CSV.--title "Charge_Rest_Discharge": Set the plot title and filename stem (for example,Charge_Rest_Discharge.png).--mode overlay: Overlay all series in a single figure, pairing each X column with the corresponding Y column.--x-col 1--x-col 7 ... 43: Enumerate the X-axis columns (0-based). Here there are six series using columns 1, 7, 13, 19, 25, and 31.--y-cols 5 --y-cols 11 ... 47: List the matching Y columns (5, 11, 17, 23, 29, 35) in the same order as the X columns.--direction-cols 0,--direction-cols 6 ... 42: Provide the state/phase columns that control colouring or segmentation per series. Supply as many direction columns as Y series.--max-legend-items 5: Limit the legend to five entries so that additional series are hidden automatically.
Sample 8: Supplementary Legend Information
This sample appends extra metadata near the legend via --legend-info for Raman spectroscopy data.
Data Overview
Dummy Raman spectroscopy data with Raman Shift (cm^-1) on the X axis and Intensity (counts) for Pos0-Pos10.
1 2 3 4 5 6 7 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 | |
How to Run
1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 | |
Option Details
legend_info: Append arbitrary text near the legend (or in the upper right). Use\nto insert line breaks.no_individual=True: Generate only the overlay image and skip individual plots.
Sample 9: Displaying Grid Lines
This XRD example enables grid lines with --grid to make peak locations easier to read.
Data Overview
The dataset uses synthetic XRD intensity values.
1 2 3 4 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 4 | |
How to Run
1 2 3 4 5 6 7 8 9 10 | |
1 2 3 | |
Option Details
grid=True,--grid: Draw horizontal and vertical grid lines to improve readability.no_individual=True: Skip individual plots and generate only the overlay image.
Sample 10: Narrowing the Display Range (xlim/ylim)
This sample zooms in on peak regions by combining --xlim and --ylim with XRD data.
Data Overview
The dataset reuses XRD intensity values and shows how to restrict the visible range.
1 2 3 4 | |

Directory Layout
Before running the sample, the directory contains:
1 2 3 4 | |
How to Run
1 2 3 4 5 6 7 8 9 10 11 | |
1 2 3 4 | |
Option Details
--xlim <min> <max>,xlim=(<min>, <max>): Restrict the X-axis range (same units as the CSV). The example displays only 2theta from 15 degrees to 30 degrees.--ylim <min> <max>,ylim=(<min>, <max>): Restrict the Y-axis range (same units as the dataset). The example keeps intensities between 180 and 240 counts.--no-individual: Produce only the overlay image and skip individual plots.
Zooming the range helps inspect peaks in detail and hide noisy regions.
Sample 11: Separating Overlay and Individual Outputs
This example saves the overlay image and individual series outputs in different directories via --main-image-dir and --output-dir.
Data Overview
The dataset reuses synthetic XRD intensity data and demonstrates splitting output destinations.
1 2 3 4 | |


Directory Layout
1 2 3 4 | |
How to Run
1 2 3 4 5 6 7 8 9 10 | |
1 2 3 | |
Output Structure After Running
1 2 3 4 5 6 7 | |
Option Details
--main-image-dir: Choose where the overlay image is saved. By default it matches--output-dir.--output-dir: Choose where individual PNG and HTML outputs are saved. Without this option, outputs live next to the input CSV.
Separating the directories keeps report-ready overlays and detailed analysis plots organised.
Sample 12: Generating Plotly HTML Outputs
This sample enables interactive Plotly HTML output with --html.
Data Overview
Synthetic XRD intensity data used to demonstrate the Plotly export option.
1 2 3 4 | |

Directory Layout
1 2 3 | |
How to Run
1 2 3 4 5 6 7 8 9 10 | |
1 2 3 | |
Directory After Execution
1 2 3 4 5 | |
Option Details
--html: Produce interactive Plotly HTML files (*.html). Open them in a browser to zoom and inspect traces.--no-individual: Skip per-series plots and keep only the combined output (the HTML goes to the same directory).
Plotly output requires the Plotly library. If it is missing, you will see the following error message:
1 2 3 | |