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.

add attribute `boxtext` to boxplots

See original GitHub issue

Would be nice if we could change the 5 (6 if boxmean=TRUE) hoverinfo texts of Plotly’s boxplots to custom values.

https://github.com/plotly/plotly.js/pull/2094 seems to introduce the text attribute for the individual data points in boxplots. An additional boxtext attribute for the aggregate summary statistics (min, lower quartile, median, mean, upper quartile, max) hoverinfo texts would be awesome.

This seems to become even more relevant when other whisker options get intoduced as proposed in https://github.com/plotly/plotly.js/issues/277. To give viewers an idea of what the values of the boxplot actually depict, the boxtext attribute could then be set to an adequately explanatory character vector.

Might be related: https://github.com/plotly/plotly.js/issues/1642

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:10 (6 by maintainers)

github_iconTop GitHub Comments

4reactions
amirh357commented, May 1, 2019

for the boxplot using plot_ly, Is it possible to have a “text” hoverinfo similar to what we can define for type=“bar” ? For example, I just want to show the median, Q1, and Q3 in a text box when I hover over a box with some additional information that I can write in that box. For example, see the figure below: Box_hoverinfo

1reaction
etpinardcommented, Nov 13, 2017

I think you’re looking for more box-centric hoverinfo flags, not a new attribute.

For example, hoverinfo: 'x+q1+mean' would only show the x, q1 and mean hover labels.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to customize hover text for plotly boxplots in R
A possible solution might be using ggplot2 package and adding an invisible scatterplot to your boxplot: library(ggplot2) library(plotly) ...
Read more >
Add text over boxplot in base R - The R Graph Gallery
Add text over boxplot in base R. This examples demonstrates how to build a boxplot with sample size written on top of each...
Read more >
Box plots with custom fill colors - Matplotlib
This plot illustrates how to create two types of box plots (rectangular and notched), and how to fill them with custom colors by...
Read more >
Box Plots
A tutorial on how to make a box plot in Chart Studio. ... set the trace names, type the name in the textbox...
Read more >
A Complete Guide to Box Plots | Tutorial by Chartio
Box plots are a streamlined way of summarizing the distribution of groups of ... another alternative is to add an annotation with each...
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