> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ionworks.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Visualizing data

> Plot battery cycling data in Ionworks Studio with stack-cycles, Nyquist EIS, cycle metrics, and AI-powered SQL step filters

Ionworks Studio provides interactive tools for exploring your uploaded battery
cycling data. The measurement viewer offers plots with flexible filtering
options to help you analyze your experiments in the browser.

For plotting from Python, see
[reading data — plotting from Python](/data/reading#plotting-from-python).

## Accessing the data viewer

To view measurement data:

1. Navigate to your **Cell Specification**
2. Select a **Cell Instance**
3. Click on a **Cell Measurement**
4. The measurement detail view opens with visualization tools

## Visualization tabs

The data viewer has tabs for different analysis perspectives:

### Time series tab

The time series view shows high-resolution measurement data over time (or other
x-axis variables).

#### Axis selection

Use the dropdown menus to select which variables to plot on the x-axis and
y-axis. Available options depend on the columns present in your measurement
data.

#### Secondary y-axis

Optionally add a secondary y-axis to overlay two variables on the same plot.
Select "None" to disable.

<Note>
  The secondary y-axis is disabled when "Stack cycles" mode is active.
</Note>

#### Overlaying multiple series with the same unit

Both the left and right y-axes accept multiple variables, as long as the
additional variables share the same unit as the primary variable on that axis.
This is useful for direct visual comparison of related signals — for example,
plotting `Voltage [V]` together with `Anode potential [V]` and `Cathode
potential [V]` on the same axis.

To overlay additional series:

1. Pick the primary variable for the axis (left or right) as usual.
2. Click **Add series with same unit** under that axis.
3. Use the new dropdown to choose any other variable with a matching unit.
4. Repeat to stack more series, or click the **×** button next to a series to
   remove it.

Each additional series is drawn with its own color so individual traces remain
distinguishable. The **Add series with same unit** button only appears when at
least one other available variable shares the primary variable's unit; changing
the primary variable to a different unit automatically clears the extra series
on that axis.

#### Stack cycles mode

Enable **Stack cycles** to overlay all cycles on top of each other by resetting
the x-axis to zero at the start of each cycle. This is useful for:

* Comparing cycle-to-cycle variations
* Identifying degradation patterns
* Visualizing capacity fade

When enabled, cycles are color-coded from blue (early cycles) to yellow (late
cycles) using a colorblind-safe palette.

#### Show step data

Enable **Show step data** to display detailed step information in hover
tooltips. The tooltip shows:

* Cycle and step numbers
* Step metrics (duration, capacity, voltage stats)
* SQL column names for use in filters

<Tip>
  Use "Show step data" to discover the column names you need for SQL filtering.
  The hover tooltip displays the exact column names used in filter queries.
</Tip>

### EIS tab

When your measurement contains impedance data (`Z_Re [Ohm]`, `Z_Im [Ohm]`, and
`Frequency [Hz]` columns), an **EIS** tab appears automatically. This tab
displays a Nyquist plot with `Z_Re [Ohm]` on the x-axis and `-Z_Im [Ohm]` on
the y-axis.

If your data contains multiple steps, each step is plotted as a separate trace
with its own color. You can use the step filter to select which steps to display.

### Cycles tab

The cycles view shows aggregated metrics per cycle, ideal for tracking
degradation and performance trends.

#### Available cycle metrics

| Metric                      | Description                        |
| --------------------------- | ---------------------------------- |
| `Discharge capacity [A.h]`  | Total discharge capacity per cycle |
| `Charge capacity [A.h]`     | Total charge capacity per cycle    |
| `Discharge energy [W.h]`    | Total discharge energy per cycle   |
| `Charge energy [W.h]`       | Total charge energy per cycle      |
| `Coulombic efficiency`      | Discharge/charge capacity ratio    |
| `Energy efficiency`         | Discharge/charge energy ratio      |
| `Capacity throughput [A.h]` | Cumulative capacity processed      |
| `Energy throughput [W.h]`   | Cumulative energy processed        |
| `Min voltage [V]`           | Minimum voltage reached in cycle   |
| `Max voltage [V]`           | Maximum voltage reached in cycle   |
| `Cycle duration [s]`        | Total cycle time                   |
| `Mean temperature [degC]`   | Average temperature during cycle   |

#### Relative / retention mode

For capacity and energy metrics, enable **Show relative** to display values
as a fraction of a reference cycle:

1. Check "Show relative"
2. Enter the reference cycle number (e.g., cycle 1 or cycle 10)
3. Values are shown as `value / reference_value`

This is useful for visualizing capacity retention curves (e.g., 80% retention
after 500 cycles).

## Filtering data

The measurement viewer provides multiple filtering methods to focus on specific
portions of your data.

### Cycle filter

Filter which cycles are displayed using several input methods:

<AccordionGroup>
  <Accordion title="Custom expression">
    Enter a custom filter expression using Python slice-like syntax:

    * Single cycles: `1, 5, 10, 20`
    * Range: `0:50` (cycles 0 through 50)
    * Negative indexing: `-10:-1` (last 10 cycles)
    * Combined: `0:10, 50, 100:110`
  </Accordion>

  <Accordion title="First N cycles">
    Quickly select the first N cycles. Enter the count and the filter
    automatically generates.
  </Accordion>

  <Accordion title="Last N cycles">
    Select the last N cycles from your dataset.
  </Accordion>

  <Accordion title="Range with step">
    Define a range with optional sampling:

    * **Min**: Starting cycle (default: 0)
    * **Max**: Ending cycle (default: last cycle)
    * **Step**: Sample every Nth cycle (e.g., step=10 shows cycles 0, 10, 20...)

    Use stepping for large datasets to reduce plot density while maintaining
    overall trends.
  </Accordion>
</AccordionGroup>

### Step filter (within cycle)

Filter which steps within each cycle are shown. This is useful for isolating
specific protocol phases:

* `0` - Show only the first step of each cycle
* `0:2` - Show steps 0, 1, and 2 of each cycle
* `1, 3, 5` - Show specific steps

<Note>
  Step numbers reset to 0 at the start of each cycle in this filter. So step 0
  is always the first step of a cycle, regardless of the overall step count.
  This filter is only available when not using Advanced mode.
</Note>

### Advanced step filter (AI-powered)

The Advanced filter mode lets you filter steps using natural language or SQL.
Simply describe what you want to see, and the AI generates the appropriate
filter.

#### Using advanced filter mode

<Steps>
  <Step title="Select Advanced mode">
    Choose "Advanced" from the filter type dropdown. This is the default when no
    filter is active.
  </Step>

  <Step title="Describe what you want">
    Type a natural language description in the text field. For example:

    * "discharge steps longer than 1 hour"
    * "charge steps with capacity > 2 Ah"
    * "rest steps"
  </Step>

  <Step title="Click Apply">
    The AI generates the SQL filter and applies it immediately. The plot updates
    to show only matching steps.
  </Step>
</Steps>

#### Refining your filter

When a filter is active, you can modify it with follow-up prompts:

* "also filter for steps longer than 1 hour" → adds to existing filter
* "change to charge steps instead" → replaces part of the filter
* "remove the duration filter" → removes a specific condition

#### SQL dialog (advanced editing)

Click the code icon `</>` to open the SQL dialog for more control:

* **AI prompt field**: Describe what you want, then click "Generate"
* **SQL editor**: Edit the SQL WHERE clause directly
* **Match mode**: Choose how to apply the filter (see below)
* **Example queries**: Click any example to insert it
* **Available columns**: Full reference of filterable columns

#### Match modes

When filtering, choose how matches are applied:

* **Matching steps only**: Show only the specific steps that match your query
* **Full cycles**: Show all steps from cycles that contain at least one matching
  step

<Tip>
  Use "Full cycles" mode when you want to filter by a cycle characteristic (like
  total cycle discharge capacity) but still see the complete cycle data for
  context.
</Tip>

#### Available SQL columns

The SQL dialog shows the complete list of available columns. Common columns
include:

**Step identification:**

* `step_count` - Overall step number
* `cycle_count` - Cycle number
* `step_from_cycler` - Original step number from cycler
* `cycle_from_cycler` - Original cycle number from cycler

**Timing:**

* `duration_s` - Step duration in seconds

**Capacity (step level):**

* `charge_capacity_ah` - Capacity charged in this step
* `discharge_capacity_ah` - Capacity discharged in this step

**Energy (step level):**

* `charge_energy_wh` - Energy charged in this step
* `discharge_energy_wh` - Energy discharged in this step

**Capacity (cycle level, cumulative):**

* `cycle_charge_capacity_ah` - Total charge capacity for the cycle
* `cycle_discharge_capacity_ah` - Total discharge capacity for the cycle

**Voltage:**

* `start_voltage_v`, `end_voltage_v`
* `min_voltage_v`, `max_voltage_v`, `mean_voltage_v`

**Current:**

* `min_current_a`, `max_current_a`, `mean_current_a`

**Power:**

* `min_power_w`, `max_power_w`, `mean_power_w`

## Plot interactions

The visualization plots support standard interactions:

* **Zoom**: Click and drag to zoom into a region
* **Pan**: Hold shift and drag to pan
* **Reset**: Double-click to reset the view
* **Hover**: Move cursor over data points to see values

### Automatic data loading

When you zoom into the time series plot, Ionworks Studio automatically fetches
higher-resolution data for the zoomed region. A loading indicator appears while
data is being fetched.

<Info>
  For large datasets, the initial view shows downsampled data for performance.
  Zooming in reveals the full resolution data for that time range.
</Info>

## Best practices

<AccordionGroup>
  <Accordion title="Start with overview, then drill down">
    Begin with the full dataset view to understand overall trends, then use
    filters to focus on specific cycles or conditions of interest.
  </Accordion>

  <Accordion title="Use stack cycles for degradation analysis">
    Stack cycles mode makes it easy to spot changes in voltage profiles, capacity,
    or other characteristics as the cell ages.
  </Accordion>

  <Accordion title="Combine filters for complex analysis">
    Use cycle filtering to select a range of cycles, then add Advanced filtering
    to isolate specific step types within those cycles.
  </Accordion>

  <Accordion title="Use natural language for quick filtering">
    The Advanced filter understands plain English. Try "discharge steps over 1
    hour" or "cycles with high capacity" instead of writing SQL manually.
  </Accordion>

  <Accordion title="Check step data for filter column names">
    Enable "Show step data" and hover over your data to see step metrics and
    the SQL column names you can reference in filters.
  </Accordion>
</AccordionGroup>

## Next steps

<CardGroup cols={2}>
  <Card title="Data format" icon="file-code" href="/data/format">
    Understand the data structure for better filtering.
  </Card>

  <Card title="Reading data" icon="download" href="/data/reading">
    Retrieve and analyze data via the Python API.
  </Card>
</CardGroup>
