question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

'Seaborn" template disabling horizontal line in fig.add_shape()

See original GitHub issue

Thanks for your interest in plotly.js!

Before opening an issue, please search for existing and closed issues. If your problem or idea is not addressed yet, please open a new issue.

Bug reports must be accompanied with a reproducible example. We recommend using codepen, jsfiddle or jsbin to share your example. Please use the latest un-minified version of plotly.js in your report unless not applicable.

If you don’t know JavaScript and still want to help us by reporting a bug, please attach the "data" and "layout" attributes that describe your graph and updates (if required to detect the bug). One way to retrieve your graph’s data and layout attributes is by exporting your graph to Plotly Cloud. To do so, click on the Edit in Chart Studio mode bar button (the 2nd one from the left by default) and follow these instructions, or watch this screencast.

Issues found on the example pages from https://plot.ly/javascript/ should be filed in our documentation repo with the exception of https://plot.ly/javascript/reference which should be filed here.

Note that GitHub issues are reserved for bug reports and feature requests only. Implementation questions should be asked on community.plot.ly (tagged plotly-js) or on Stack Overflow (tagged plotly).

Comments on GitHub issues or pull requests should add content to the discussions. Approbation comments such as +1 or I would like this feature to be implemented as well will be deleted by the maintainers. Please use GitHub reactions instead.

Issue Analytics

  • State:open
  • Created 3 years ago
  • Comments:5 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Sep 8, 2020

Indeed, this is quite strange! Here’s an easier-to-replicate example:

import plotly.express as px
df = px.data.stocks(indexed=True)
fig = px.line(df, template="seaborn")
fig.add_shape(type = 'line', y0=1.5, y1=1.5, x0=0, x1=1, xref = 'paper', yref = 'y', line_color ='red', line_dash = 'dot')
fig.show()
0reactions
jarvas24commented, Nov 16, 2021

Any updates on this? Seems to still be an issue in plotly 5.4.0 for the ggplot2, seaborn, and simple_white templates:

import plotly.io as pio
{
    t: pio.templates[t]['layout']['shapedefaults']['line']['width']
    for t in pio.templates.keys()
}
{'ggplot2': 0,
 'seaborn': 0,
 'simple_white': 0,
 'plotly': None,
 'plotly_white': None,
 'plotly_dark': None,
 'presentation': None,
 'xgridoff': None,
 'ygridoff': None,
 'gridon': None,
 'none': None}
Read more comments on GitHub >

github_iconTop Results From Across the Web

Is there a way to add a horizontal line or vertical line similar to ...
added a horizontal line using fig.add_shape(), however, the line was disabled once i specified the 'seaborn' template, is there a way around ...
Read more >
Controlling figure aesthetics — seaborn 0.12.1 documentation
The first group sets the aesthetic style of the plot, and the second scales various elements of the figure so that it can...
Read more >
Horizontal and vertical lines and rectangles in Python - Plotly
Detailed examples of Horizontal and Vertical Lines and Rectangles including changing color, size, log axes, and more in Python.
Read more >
Draw a line at specific position/annotate a Facetgrid in seaborn
I now want to draw to distinct horizontal lines in each of the plot. For instance one horizontal line (with coordinated (0,10)) only...
Read more >
Adding a horizontal line in a Seaborn plot in Python
Next, the graph.axhline() function creates a horizontal line in the bar plot. For this tutorial example, I have taken the horizontal line to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found