> For the complete documentation index, see [llms.txt](https://docs.shimoku.com/dev/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.shimoku.com/dev/elements/charts/line-charts/line-with-confidence-area.md).

# Line With Confidence Area

The line with confidence area presents a data trend alongside a shaded region that represents the variability or uncertainty of the data. This shaded region, often termed the 'confidence interval' or 'confidence band', gives an idea of the reliability of predictions or the possible range within which the actual values may lie. It is instrumental in scenarios where it's vital to understand the degree of certainty or risk associated with the data points.

## The Method To Use <a href="#the-method-to-use.1" id="the-method-to-use.1"></a>

The method is `s.plt.line_with_confidence_area()`.

It must contain the following input variables:

```python
data: Union[str, DataFrame, List[Dict]]
order: int 
x: str
y: str
lower: str 
upper: str
```

Accepts the following input variables as optional:

```python
rows_size: Optional[int] = None
cols_size: Optional[int] = None,
padding: Optional[str] = None
title: Optional[str] = None,
x_axis_name: Optional[str] = None
y_axis_name: Optional[str] = None,
percentages: bool = False
option_modifications: Optional[Dict] = None
variant: Optional[str] = None
```

## Examples <a href="#examples" id="examples"></a>

The following code:

```python
confidence_data = requests.get(url='https://echarts.apache.org/examples/data/'
                                   'asset/data/confidence-band.json').json()
for dat in confidence_data:
    dat['value'] = dat['value'] * 100
    dat['l'] = dat['l'] * 100
    dat['u'] = dat['u'] * 100

s.plt.line_with_confidence_area(
    data=confidence_data, order=0,
    title='Confidence Band Chart',
    x='date', y='value', 
    lower='l', upper='u',
    x_axis_name='Date',
    y_axis_name='Value',
    percentages=True,
)
```

<figure><img src="/files/3GGMLD77rFQxicRuOil8" alt=""><figcaption></figcaption></figure>

## Variants

By setting the parameter `variant` to the following values the appearance of the chart can be changed:

{% tabs %}
{% tab title="Clean" %}

<figure><img src="/files/z6sx8NX6qxafEhKQmAYR" alt=""><figcaption><p>variant="clean"</p></figcaption></figure>
{% endtab %}

{% tab title="Minimal" %}

<figure><img src="/files/ZY77OClsFDt13AuoyuFm" alt=""><figcaption><p>variant="minimal"</p></figcaption></figure>
{% endtab %}
{% endtabs %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.shimoku.com/dev/elements/charts/line-charts/line-with-confidence-area.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.
