# Is it possible to use \`hv\` line shape in a Scattergl plot?

**URL:** <https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744>\
**Category:** 📊 Plotly Python\
**Created:** [October 19, 2018, 10:30am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744 "2018-10-19T10:30:18Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![ebosi](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@ebosi](https://community.plotly.com/u/ebosi)\
**Post date:** [October 19, 2018, 10:30am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744/1 "2018-10-19T10:30:18Z")

</div>

The [documentation](https://plot.ly/python/line-charts/#interpolation-with-line-plots) explains how to use different line shapes/interpolation in scatter plots:

![newplot](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/4/4be3bd1baf5895dad06e64db168ae1e78c1152dc.png)

I would like to use the same feature, using `go.Scattergl` instead of `go.Scatter`. The code used is:

```
import plotly.plotly as py
import plotly.graph_objs as go

trace1 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[1, 3, 2, 3, 1],
    mode='lines+markers',
    name="'linear'",
    hoverinfo='name',
    line=dict(
        shape='linear'
    )
)
trace2 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[6, 8, 7, 8, 6],
    mode='lines+markers',
    name="'spline'",
    text=["tweak line smoothness<br>with 'smoothing' in line object"],
    hoverinfo='text+name',
    line=dict(
        shape='spline'
    )
)
trace3 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[11, 13, 12, 13, 11],
    mode='lines+markers',
    name="'vhv'",
    hoverinfo='name',
    line=dict(
        shape='vhv'
    )
)
trace4 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[16, 18, 17, 18, 16],
    mode='lines+markers',
    name="'hvh'",
    hoverinfo='name',
    line=dict(
        shape='hvh'
    )
)
trace5 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[21, 23, 22, 23, 21],
    mode='lines+markers',
    name="'vh'",
    hoverinfo='name',
    line=dict(
        shape='vh'
    )
)
trace6 = go.Scattergl(
    x=[1, 2, 3, 4, 5],
    y=[26, 28, 27, 28, 26],
    mode='lines+markers',
    name="'hv'",
    hoverinfo='name',
    line=dict(
        shape='hv'
    )
)
data = [trace1, trace2, trace3, trace4, trace5, trace6]
layout = dict(
    legend=dict(
        y=0.5,
        traceorder='reversed',
        font=dict(
            size=16
        )
    )
)
fig = dict(data=data, layout=layout)
py.iplot(fig, filename='line-shapes')

```

However, when run, the code above return an error, saying that

ValueError: Invalid property specified for object of type plotly.graph\_objs.scattergl.Line: ‘shape’

```
Valid properties:
    color
        Sets the line color.
    dash
        Sets the style of the lines.
    width
        Sets the line width (in px).

```

**Question:** Is this because `Scattergl` does not support this feature yet? Is not intended to support this feature in the future? Or is it just due to an outdated install on my side?

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [October 20, 2018, 9:53am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744/2 "2018-10-20T09:53:37Z")

</div>

Hi @ebosi,

Unfortunately, the scattergl trace doesn’t support line shapes at this point. It’s possible it could in the future, but I’m not aware of any plans for it at this point.

-Jon

---

<div class="post-metadata">

**Author:** ![ebosi](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@ebosi](https://community.plotly.com/u/ebosi)\
**Post date:** [October 22, 2018, 8:04am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744/3 "2018-10-22T08:04:14Z")

</div>

Thank you for the answer!

---

<div class="post-metadata">

**Author:** ![jmmease](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/jmmease/32/3706_2.png) [@jmmease](https://community.plotly.com/u/jmmease)\
**Post date:** [October 30, 2018, 10:27am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744/4 "2018-10-30T10:27:41Z")

</div>

Hi @ebosi,

As it turns out, this was just implemented and released in plotly.js 1.42.0 ([https://github.com/plotly/plotly.js/pull/3087](https://github.com/plotly/plotly.js/pull/3087)). This will be included in plotly.py 3.4.0 (hopefully to be released in the next week or so).

-Jon

---

<div class="post-metadata">

**Author:** ![ebosi](https://avatars.discourse-cdn.com/v4/letter/e/73ab20/32.png) [@ebosi](https://community.plotly.com/u/ebosi)\
**Post date:** [October 30, 2018, 10:44am UTC](https://community.plotly.com/t/is-it-possible-to-use-hv-line-shape-in-a-scattergl-plot/14744/5 "2018-10-30T10:44:48Z")

</div>

Brilliant! Thanks for the follow up!
