# Create Plot

### Overview

This procedure can create **scatter**, **line**, or **box** plots. The plot type is determined by the adjective used *("scatter", "line", or "box")*. Scatter and line plots require both x and y values, while box plots need only a single list of values.

### Syntax

Below is a line-by-line overview of the automation syntax. Expand each line to learn more.

<details>

<summary><code>create a {scatter|line|box} plot where</code></summary>

#### What does it do?

Begins a plot definition block.

#### Where does it go?

This phrase should be written on a **new line**.

#### Is it required?

✅ Yes — This phrase is **required**.

#### Does it require data?

✅ Yes — Replace the adjective with **scatter**, **line**, or **box**.

#### Example

```
create a scatter plot where
```

</details>

<details>

<summary><code>the x values are x-values</code></summary>

#### What does it do?

Provides x-axis data points.

#### Where does it go?

Indented under `create a {scatter|line} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **x-values** with a list of numbers or reference to table data. This is required when creating **scatter** or **line** plots.

#### Example

```
the x values are [1, 2, 3, 4, 5]
```

</details>

<details>

<summary><code>the y values are y-values</code></summary>

#### What does it do?

Provides y-axis data points.

#### Where does it go?

Indented under `create a {scatter|line} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **y-values** with a list of numbers or reference to table data. This is required when creating **scatter** or **line** plots.

#### Example

```
the y values are [1, 2, 3, 4, 5]
```

</details>

<details>

<summary><code>the values are plot-values</code></summary>

#### What does it do?

Provides data for box plot distribution analysis.

#### Where does it go?

Indented under `create a box plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **plot-values** with a list of numbers or reference to table data. This is required when creating **box** plots.

#### Example

```
the values are [75, 82, 88, 91, 85, 79, 93, 87, 90, 84]
```

</details>

<details>

<summary><code>the title is "plot-title"</code></summary>

#### What does it do?

Sets the plot title.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **plot-title** with a text string to be used as the plot title.

#### Example

```
the title is "Exam Scores vs. Time Spent Studying"
```

</details>

<details>

<summary><code>the x label is "x-label"</code></summary>

#### What does it do?

Labels the x-axis.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **x-label** with a text string to label the x-axis.

#### Example

```
the x label is "Study Time (hrs)"
```

</details>

<details>

<summary><code>the y label is "y-label"</code></summary>

#### What does it do?

Labels the y-axis.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **y-label** with a text string to label the y-axis.

#### Example

```
the y label is "Exam Scores"
```

</details>

<details>

<summary><code>the color palette is "color-palette"</code></summary>

#### What does it do?

Sets the color scheme for the plot.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **color-palette** with one of `kognitos`,`lavender`,`rocket`, or any [HTML named color](https://developer.mozilla.org/en-US/docs/Web/CSS/named-color) (e.g., `red`, `blue`, `green`, `purple`, `orange`, etc.). The default is `kognitos`.

#### Example

```
the color palette is "blue"
```

</details>

<details>

<summary><code>the style is s</code></summary>

#### What does it do?

Sets the seaborn plot style.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **s** with one of `white`, `darkgrid`, `whitegrid`, `dark`, `ticks`. The default is `white`.

#### Example

```
the style is "white"
```

</details>

<details>

<summary><code>the font is f</code></summary>

#### What does it do?

Sets the font family for all text.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **f** with a font name. The default is `Raleway Light`.

#### Example

```
the font is "Arial"
```

</details>

<details>

<summary><code>the dpi is d</code></summary>

#### What does it do?

Sets output image resolution.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **d** with a numeric value (dots per inch). The default is `600`.

#### Example

```
the dpi is 300
```

</details>

<details>

<summary><code>the title font size is s</code></summary>

#### What does it do?

Sets the title font size.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **s** with a numeric value. The default is `20`.

#### Example

```
the title font size is 16
```

</details>

<details>

<summary><code>the x label font size is s</code></summary>

#### What does it do?

Sets the x-axis label font size.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **s** with a numeric value. The default is `15`.

#### Example

```
the x label font size is 14
```

</details>

<details>

<summary><code>the y label font size is s</code></summary>

#### What does it do?

Sets the y-axis label font size.

#### Where does it go?

Indented under `create a {scatter|line|box} plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **s** with a numeric value. The default is `15`.

#### Example

```
the y label font size is 14
```

</details>

<details>

<summary><code>the trendline is "type"</code></summary>

#### What does it do?

Adds a trendline to scatter plots.

#### Where does it go?

Indented under `create a scatter plot where`.

#### Is it required?

❌ No — This phrase is **optional**.

#### Does it require data?

✅ Yes — Replace **type** with `linear`, `quadratic`, `none`, or `disabled`.

#### Example

```
the trendline is "linear"
```

</details>

### Examples

#### 1. Scatter Plot with Direct Values

```
create a scatter plot where
    the x values are [1, 2, 3, 4, 5]
    the y values are [85, 90, 78, 92, 88]
    the title is "Exam Scores vs. Study Hours"
    the x label is "Study Hours"
    the y label is "Exam Scores"
    the style is "white"
```

#### 2. Line Plot with Table Data

```
create a line plot where
    the x values are the table's months
    the y values are the table's sales
    the title is "Sales Over Time"
    the x label is "Month"
    the y label is "Sales ($)"
    the color palette is "blue"
```

#### 3. Box Plot with Direct Values

```
create a box plot where
    the values are [75, 82, 88, 91, 85, 79, 93, 87, 90, 84]
    the title is "Test Score Distribution"
    the x label is "Scores"
    the style is "white"
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.kognitos.com/legacy/legacy-experience/automation-areas/charts/create-plot.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
