# Artifacts in hover over embedded plot

**URL:** <https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153>\
**Category:** plotly.js\
**Created:** [December 5, 2017, 1:49am UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153 "2017-12-05T01:49:29Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 5, 2017, 1:49am UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/1 "2017-12-05T01:49:29Z")

</div>

I am getting some artifacts that follow my cursor in a scatter plot. I am using javascript to put the plot in a DIV on the page. Also of note is that the page uses some canvas elements via P5.js. I know the first thing people will ask is for an example that duplicates the bug. I can’t make it; it shows up in my giant complicated code, it doesn’t show up in anything else I make in codepen or anywhere else. Here is an image:  
 ![20 PM](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/d/d7afb854bdb5d7a4e485faf8fa7f6058be855b31.png)

I know its a long shot, but anybody even know where I might start?

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [December 5, 2017, 2:19pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/2 "2017-12-05T14:19:53Z")

</div>

Yikes. I’ve never seen this before.

Would you mind sharing a reproducible example to help us debug?

---

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 5, 2017, 10:53pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/3 "2017-12-05T22:53:15Z")

</div>

@etienne, I definitely get how helpful a reproducible example would be. I will do my best to figure out what is causing it so I can reproduce it in a simple example. My best guess right now is it is some interference from p5.js overlap. I can’t confirm this, but is seems to be drawing a new line above the graph each time p5 refreshes the canvas. I have no idea how that could happen, but it’s the only thing I can think of. I will work on reproducing it in a simple example. In the meantime do you have any ideas at all? It’s a pretty serious bug…

---

<div class="post-metadata">

**Author:** ![dannypage](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/dannypage/32/2137_2.png) [@dannypage](https://community.plotly.com/u/dannypage)\
**Post date:** [December 7, 2017, 4:07pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/4 "2017-12-07T16:07:43Z")

</div>

I have a similar issue as well. I’ll see if I can simplify it into a Codepen. If I tab away from the page and tab back, it disappears for good. It also temporarily disappears and reappears when other onHover() calls happen on the page, unrelated to the graph.

**Edit:** This is NOT happening on Safari 11.0.2, but it is happening on Chrome 62. (Mac and Windows)

![40 AM](https://us1.discourse-cdn.com/flex024/uploads/plot/original/2X/8/8220290cdb614abac69855f59ce0cea13a86cf36.png)

---

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 7, 2017, 6:54pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/5 "2017-12-07T18:54:57Z")

</div>

I’m trying to figure out what is the same about our plots. Here is my layout variable:

```
var layout = {

 font: {
 family:'Roboto',
 size: 12,
 color: 'rgb(54, 54, 54)'
 },
 yaxis: {title: "Temperature [C]",
 tickmode: "auto",
 tickvals: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
 ticktext:['off','on','off','on','off','on','off','on','off','on','off','on','off','on','off','on'],
 domain: [0,.49],
 mirror:'ticks',
 showline:true,
 linecolor: 'rgb(54, 54, 54)',
 ticklen:0,
 tickcolor: 'rgb(245, 245, 245)',
 linewidth: 1}, // set the y axis title
 yaxis2: {title: "Pressure [bara]",
 tickmode: "auto",
 tickvals: [0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15],
 ticktext:['off','on','off','on','off','on','off','on','off','on','off','on','off','on','off','on'],
 domain: [.51,1],
 mirror:'ticks',
 showline:true,
 linecolor: 'rgb(54, 54, 54)',
 linewidth: 1,
 ticklen:0,
 visible:true,
 tickcolor: 'rgb(245, 245, 245)'},
 xaxis: {title: "Time (your current local time)",
 mirror:'ticks',
 showline:true,
 linecolor: 'rgb(54, 54, 54)',
 linewidth: 1,
 tickformat: "%H:%M" // customize the date format to
 },
 showlegend: true,
 paper_bgcolor: 'transparent', //'rgb(245, 245, 245)',
 plot_bgcolor: 'rgb(255, 255, 255)',
 autosize: false,
 legend: {
 orientation: "h",
 y:-.2,
 x:0,
 font: {
 family:'Roboto',
 size: 12,
 color: 'rgb(54, 54, 54)'}
 },
 hoverlabel:{
 font: {
 family:'Roboto',
 size: 12,
 },
 namelength:(-1)
 },
 margin: {
 l: 60,
 r: 60,
 b: 40,
 t: 30,
 pad: 4
 },
 height: 540,
 width: 850
 };

```

I am running two overlapping divs: one is a P5.js canvas and the other is the plotly plot. I made this codepen that simulates the formatting I am using but it doesn’t duplicate the issue: [https://codepen.io/murenrb/pen/bYPgbL](https://codepen.io/murenrb/pen/bYPgbL)

I am using restyle to update the arrays and maybe that is somehow causing the issue? I am going to try to play with that more in the codepen and see if I can get it to duplicate.

What is your general setup?

---

<div class="post-metadata">

**Author:** ![dannypage](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/dannypage/32/2137_2.png) [@dannypage](https://community.plotly.com/u/dannypage)\
**Post date:** [December 7, 2017, 7:22pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/6 "2017-12-07T19:22:33Z")

</div>

Here’s my reproduced chart as well.

[https://plot.ly/~dannypage/1/](https://plot.ly/~dannypage/1/)

---

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 11, 2017, 4:57pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/7 "2017-12-11T16:57:02Z")

</div>

@Etienne, can you weigh in on this? It seems like a pretty serious bug that now multiple people are seeing.

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [December 11, 2017, 6:01pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/8 "2017-12-11T18:01:16Z")

</div>

Well. Looks like nobody was able to reproducible the bug in an isolated environment. So there’s not much I can do at this stage.

---

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 11, 2017, 6:05pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/9 "2017-12-11T18:05:06Z")

</div>

Great, you don’t care that your product sucks. No problem. I will figure out how to reproduce it.

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [December 11, 2017, 7:17pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/10 "2017-12-11T19:17:15Z")

</div>

Funny how you went from

> [@murenrb](#):
>
> I know its a long shot, but anybody even know where I might start?

to

> [@murenrb](#):
>
> Great, you don’t care that your product sucks. No problem. I will figure out how to reproduce it.

in one week.

---

<div class="post-metadata">

**Author:** ![murenrb](https://avatars.discourse-cdn.com/v4/letter/m/a587f6/32.png) [@murenrb](https://community.plotly.com/u/murenrb)\
**Post date:** [December 11, 2017, 9:14pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/11 "2017-12-11T21:14:11Z")

</div>

That is funny. Your lack of interest in a serious bug in your software made me extremely frustrated and given that I think I went through a very predictable transition in my attitude.

Debugging without a simple reproducible example is really hard. I am spending, and will continue to spend a lot of time trying to make a simple example for you. But in the meantime you could have responded with a more productive message like: “It’s a serious bug, thanks for making us aware of it. We will try our best.” instead of responding with:

> there’s not much I can do at this stage.

This is, after all, your product. If it were my project I would at least be apologetic about it not working well. I am simply stating a fact: you don’t care about your product’s quality.

I will let you know when I get an isolated example working. Or, if you don’t care, we can just mark this as resolved and move on with our lives.

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [December 11, 2017, 11:50pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/12 "2017-12-11T23:50:05Z")

</div>

> [@murenrb](#):
>
> serious bug in your software

Hmm. Without a reproducible example, how can you be sure that’s the case?

---

<div class="post-metadata">

**Author:** ![dannypage](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/dannypage/32/2137_2.png) [@dannypage](https://community.plotly.com/u/dannypage)\
**Post date:** [December 12, 2017, 5:02pm UTC](https://community.plotly.com/t/artifacts-in-hover-over-embedded-plot/7153/13 "2017-12-12T17:02:55Z")

</div>

@etienne, Thanks for any time looking at this. I played around with my plot above: Looks like the combination of [hover on the line traces + the area charts] is what created the artifacts for me. I talked with my team; we are gonna drop the area charts and move forward. Hopefully this helps a bit if you all get a chance to look at it, but otherwise I’m good! Thanks again!

PS: Redrawing the chart on onLeave() didn’t help on Windows + Chrome 63, it did on Mac. _shrug_
