# Boxplot with precomputed quartiles without displaying data

**URL:** <https://community.plotly.com/t/boxplot-with-precomputed-quartiles-without-displaying-data/71031>\
**Category:** 📊 Plotly Python\
**Created:** [December 20, 2022, 11:48pm UTC](https://community.plotly.com/t/boxplot-with-precomputed-quartiles-without-displaying-data/71031 "2022-12-20T23:48:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![matsuo\_basho](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@matsuo\_basho](https://community.plotly.com/u/matsuo_basho)\
**Post date:** [December 20, 2022, 11:48pm UTC](https://community.plotly.com/t/boxplot-with-precomputed-quartiles-without-displaying-data/71031/1 "2022-12-20T23:48:19Z")

</div>

I’m following the instructions in the [‘Precomputed Quartiles’ section](https://plotly.com/python/box-plots/), but want to build the plots without displaying the data. How would I do that?

```auto
import plotly.graph_objects as go

fig = go.Figure()

fig.add_trace(go.Box(y=[
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
      ], name="Precompiled Quartiles"))

fig.update_traces(q1=[1, 2, 3], median=[4, 5, 6],
                  q3=[7, 8, 9], lowerfence=[-1, 0, 1],
                  upperfence=[5, 6, 7], mean=[2.2, 2.8, 3.2],
                  sd=[0.2, 0.4, 0.6], notchspan=[0.2, 0.4, 0.6] )

fig.show()

```

---

<div class="post-metadata">

**Author:** ![matsuo\_basho](https://avatars.discourse-cdn.com/v4/letter/m/3d9bf3/32.png) [@matsuo\_basho](https://community.plotly.com/u/matsuo_basho)\
**Post date:** [December 23, 2022, 8:44pm UTC](https://community.plotly.com/t/boxplot-with-precomputed-quartiles-without-displaying-data/71031/2 "2022-12-23T20:44:01Z")

</div>

So it appears that it’s as simple as adding the boxpoints = False argument.

```auto
fig = go.Figure()

fig.add_trace(go.Box(y=[
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9],
        [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
      ], name="Precompiled Quartiles", boxpoints=False,)
      )

fig.update_traces(q1=[1, 2, 3], median=[4, 5, 6],
                  q3=[7, 8, 9], lowerfence=[-1, 0, 1],
                  upperfence=[5, 6, 7], mean=[2.2, 2.8, 3.2],
                  sd=[0.2, 0.4, 0.6], notchspan=[0.2, 0.4, 0.6] )

fig.show()

```

However, it would be more elegant if there’s a way to not have to specify the data, since it’s dummy data and not used.
