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.

colorbar draws outside the bounds

See original GitHub issue

Hey Plotly team,

Small bug - sometimes, depending on the layout’s height/vertical margins, one of the colorbar’s .cbfill will get drawn outside the outline (see http://codepen.io/hellochar/pen/JREjyv): image

Looks like it’s only off by 1 pixel:

image

It is a noticeable artifact that sometimes appears in our charts. Any ideas what’s going on here? Happy to submit a PR as well if someone could help me understand the code at https://github.com/plotly/plotly.js/blob/master/src/components/colorbar/draw.js#L348

Thanks, Xiaohan

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:1
  • Comments:14 (13 by maintainers)

github_iconTop GitHub Comments

1reaction
alexcjohnsoncommented, Jul 24, 2017

possibly - crispEdges is what I was going to do to fix the other part of this anyway - just worried that this will lead to other instances where the line gets completely deleted too - typically that’s even easier to do crisp than non-crisp.

1reaction
alexcjohnsoncommented, Jul 24, 2017

@etpinard pointed out this issue when I mentioned a related one during #1906, so I might as well combine them and tackle them simultaneously:

we’re not doing crisp rendering of colorbars - particularly the outlines, but line levels should probably be crisp too

Read more comments on GitHub >

github_iconTop Results From Across the Web

matplotlib colorbar boundaries do not implemented
I set the limits of the contour plot with map.contourf(x, y, U_10m, vmin=0, vmax=25) and this seems to give consistent colour scales for...
Read more >
Customizing Colorbars | Python Data Science Handbook
The colorbar has some interesting flexibility: for example, we can narrow the color limits and indicate the out-of-bounds values with a triangular arrow...
Read more >
Customized Colorbars Tutorial - Matplotlib
BoundaryNorm which generates a colormap index based on discrete intervals and extended ends to show the "over" and "under" value colors. Over and...
Read more >
colorbar - Draws a vertical color bar - Scilab Online Help
colorbar (…) draws a vertical color bar on the right side of the current axes. The width of the targetted axes is priorly...
Read more >
Figure.colorbar — ProPlot documentation - Read the Docs
colorbar (loc='b', cols=(1, 2)) draws a colorbar beneath the left two columns of subplots. By default the colorbar will span every subplot row...
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