> For the complete documentation index, see [llms.txt](https://dev-anirban.gitbook.io/jetchart/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://dev-anirban.gitbook.io/jetchart/plot-tool-kit/linear-plots/string-label-line-plot.md).

# String Label Line Plot

## Introduction

A normal line plot, also called a dot plot, is a graph that shows the frequency, or the number of times, a value occurs in a data set. Line plots are constructed with each value recorded along the horizontal axis, also called the x-axis.

A **string label line plot** is created when we use custom string labels for the Y Axis instead of the ones calculated internally by the library.

&#x20;Also, multiple data sets can be passed through the function to create double/multiple line charts.

<div><figure><img src="/files/KJDrUYlw7SmtyT8zIMXu" alt=""><figcaption><p>One Linear Data Set Object</p></figcaption></figure> <figure><img src="/files/J0m4dJWWw52O9njjmpem" alt=""><figcaption><p>Two Linear Data Set Object</p></figcaption></figure></div>

<div><figure><img src="/files/LFQbPTW1oo4m3wv53A2q" alt=""><figcaption><p>Three Linear Data Set Object</p></figcaption></figure> <figure><img src="/files/ST31xLbIldchTVpNi6Od" alt=""><figcaption><p>Four Linear Data Set Object</p></figcaption></figure></div>

## Code Example

According to the number of Linear Data Sets in the list, the plot shows the plotted lines for all the data sets respectively.

If you provide a single linear data set, only **one line plot** is created. Similarly, if you provide two coordinate sets then **two line plots** will be created and so on.

*Example of a line plot with a list of linear data set objects :-*&#x20;

```kotlin
// X Axis Labels Example
val xAxisLabels = listOf("Jan" , "Feb" , "Mar").toCoordinateSet()

// y Axis Labels Example
val yAxisLabels = mutableListOf(
    Coordinate("Worst"),
    Coordinate("Bad"),
    Coordinate("Average"),
    Coordinate("Good"),
    Coordinate("Excellent")
)

// This function draws the String Line Plot
BasicLinearStrategy.LinePlot(
    linearData = BasicDataStrategy(
        linearDataSets = linearDataSet1, // List<LinearDataSet>
        xAxisLabels = xAxisLabels,
        yAxisLabels = yAxisLabels.toMutableList()
    )
)
```

{% hint style="info" %}
Note :- In custom label system the data values are mapped to the index values of the custom label.

For example, in above code, if the value in the data set is ***0***,  its point will be plotted along the *Worst **label*** in the Y - axis.
{% endhint %}
