Which plot.ly json property enables all hover data to be displayed when hovering over one line

Alex

I am plotting two lines on a graph in Matlab, and converting it to plot.ly using the Matlab library. When I use the 'strip' = false json property, it preserves the Matlab layout. However, it removes the nice feature where by you get all the data when you hover over one line. When 'strip' = false, you only get data pertaining to the line you hover over.

Does anyone know how to use 'strip' = false and yet retain all the hover overs?

Sample code in Matlab:

X = linspace(0,2*pi,50)';
Y = [cos(X), 0.5*sin(X)];
figure
plot(X,Y)

Then generate two plot.ly plots:

fig2plotly(gcf, 'strip', 0);
fig2plotly(gcf, 'strip', 1);

These can be respectively found at:

https://plot.ly/~alexdp/0

https://plot.ly/~alexdp/2

Note the difference in the hover over behaviour.

Tarun Gaba

When you convert a matlab figure to Plotly Figure with strip=false, the hovermode attribute is set to closest by default, hence it only shows data pertaining to nearest curve on hovering. To override this behaviour:

X = linspace(0,2*pi,50);
Y = [cos(X), 0.5*sin(X)];
figure
plot(X,Y)

% Convert the chart..
plotly_fig = fig2plotly(gcf, 'strip', 0)

% Set hovermode to blank (basically disable the attribute)
plotly_fig.layout.hovermode=''

% Send the updated figure to plotly:
resp = plotly(plotly_fig)
url = resp.url

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

Which plot.ly json property enables all hover data to be displayed when hovering over one line

From Dev

Losing hover when hovering over text

From Dev

Keep :hover effect when hovering over another :hover

From Dev

Overlapping Anchor Tags When Hovering Over One

From Dev

Hover animation stops immediately when the mouse is no longer hovering over it?

From Dev

Parent Hover State when hovering over Sub Menu

From Dev

Hide background layer on hover, reapers when hovering over <p> element

From Dev

Change image properties on hover when hovering element which trigger when hovering the image

From Dev

How to select specific list items in a list and add a line through property when mouse is hovering/clicking over them in Javascript

From Dev

Hover over one element shows div, and show second second div while hovering over it

From Dev

plot.ly Hover Box Size attribute

From Dev

Why does the <li> element not change color and width when I hover the mouse over it after hovering over the image?

From Dev

Why is parts of the css hover color getting left over when hovering over links?

From Dev

How to change css of one class when hovering over another?

From Dev

How to highlight multiple rows when hovering over one row

From Dev

Only fire one onmouseover when hovering over multiple elements

From Dev

Changing the style of one div when hovering over another

From Dev

CSS how to select each li after the one im hovering, IF i hover over a specific child of that li

From Dev

Format hover text to $ in stacked area plot (R / Plot.ly)

From Dev

Stop hovering over input label from activing the input's hover styles when for...id is provided

From Dev

Fade back DIV on hover- even when hovering over front DIV

From Dev

Hover effect is not working: Div color is not changed when hovering over a <a> anchor tag

From Dev

When hovering over <nav> link, website randomly changes the hover background size

From Dev

How to apply hover effect to image when hovering over a button placed on top of that image?

From Dev

Is it possible to remove a portion of a CSS hover overlay when hovering over a child element?

From Dev

How to make an element active on hover, and remain active when im hovering over another specific div

From Dev

Hover effect happens on all articles, instead of just the one I'm hovering

From Dev

Possible to make labels appear when hovering over a point in matplotlib in stem plot?

From Dev

Possible to make labels appear when hovering over a point in matplotlib in stem plot?

Related Related

  1. 1

    Which plot.ly json property enables all hover data to be displayed when hovering over one line

  2. 2

    Losing hover when hovering over text

  3. 3

    Keep :hover effect when hovering over another :hover

  4. 4

    Overlapping Anchor Tags When Hovering Over One

  5. 5

    Hover animation stops immediately when the mouse is no longer hovering over it?

  6. 6

    Parent Hover State when hovering over Sub Menu

  7. 7

    Hide background layer on hover, reapers when hovering over <p> element

  8. 8

    Change image properties on hover when hovering element which trigger when hovering the image

  9. 9

    How to select specific list items in a list and add a line through property when mouse is hovering/clicking over them in Javascript

  10. 10

    Hover over one element shows div, and show second second div while hovering over it

  11. 11

    plot.ly Hover Box Size attribute

  12. 12

    Why does the <li> element not change color and width when I hover the mouse over it after hovering over the image?

  13. 13

    Why is parts of the css hover color getting left over when hovering over links?

  14. 14

    How to change css of one class when hovering over another?

  15. 15

    How to highlight multiple rows when hovering over one row

  16. 16

    Only fire one onmouseover when hovering over multiple elements

  17. 17

    Changing the style of one div when hovering over another

  18. 18

    CSS how to select each li after the one im hovering, IF i hover over a specific child of that li

  19. 19

    Format hover text to $ in stacked area plot (R / Plot.ly)

  20. 20

    Stop hovering over input label from activing the input's hover styles when for...id is provided

  21. 21

    Fade back DIV on hover- even when hovering over front DIV

  22. 22

    Hover effect is not working: Div color is not changed when hovering over a <a> anchor tag

  23. 23

    When hovering over <nav> link, website randomly changes the hover background size

  24. 24

    How to apply hover effect to image when hovering over a button placed on top of that image?

  25. 25

    Is it possible to remove a portion of a CSS hover overlay when hovering over a child element?

  26. 26

    How to make an element active on hover, and remain active when im hovering over another specific div

  27. 27

    Hover effect happens on all articles, instead of just the one I'm hovering

  28. 28

    Possible to make labels appear when hovering over a point in matplotlib in stem plot?

  29. 29

    Possible to make labels appear when hovering over a point in matplotlib in stem plot?

HotTag

Archive