---
title: "Multiple lines using a Z variable"
slug: "multiple-lines-using-a-z-variable"
updated: 2026-03-23T14:45:26Z
published: 2026-03-23T14:45:26Z
canonical: "userguide.dataclassroom.com/multiple-lines-using-a-z-variable"
---

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

# Multiple lines using a Z variable

You've probably seen that a categorical Z variable can be used to [color your data](/v1/docs/coloring-by-categorical-z) on a graph.

But it can also be used to display a graph with multiple lines or to display multiple series of data:

- Visually, so they appear separated on the graph
- Analytically, so each group gets its own regression calculation

### Multiple line graph

Here is an example of a line graph where a **categorical grouping variable** (in this case the experimental group temperature) is used as the [**Z variable**](/v1/docs/the-z-axis).

Together with the **Connect dots with lines** option this makes a multiple line graph. A line will be drawn for each value of the Z variable.

![](https://cdn.document360.io/62f8f41e-e041-42c4-b9bc-8ae1eb45d064/Images/Documentation/image-1704192646222.png)

### Multiple regression lines

If you are instead wanting to show multiple regression lines, then [see this article](/v1/docs/multiple-regression-lines).
