Hi,
I have noticed that on certain browsers/ (not retina
display) monitors that there is a noticeable anti-aliasing effect taking place at
different levels of chart zoom.
My goal is to be able to plot single pixel
lines without shadow/smoothing.
I cant find anything in the Bokeh documentation
regarding this, so I spent some time reading about how Bokeh creates a canvas
object – which has a known anti-aliasing issue. I found this stack overflow
thread which discusses it: http://stackoverflow.com/questions/7615009/disable-interpolation-when-scaling-a-canvas
From stack overflow it seems that the cleanest solution is to add:
“The most cross-platform, CSS-only solution
so far is thus:
canvas {
image-rendering: optimizeSpeed; /* Older versions of FF */
image-rendering: -moz-crisp-edges; /* FF 6.0+ */
image-rendering: -webkit-optimize-contrast; /* Safari */
image-rendering: -o-crisp-edges; /* OS X & Windows Opera (12.02+) */
image-rendering: pixelated; /* Awesome future-browsers */
-ms-interpolation-mode: nearest-neighbor; /* IE */
}
“
Unfortunately web development is not one of my strengths and
there does not seem to be an obvious way to add this to the Bokeh css file. Would
anyone be able to point me in the right direction so that I can explicitly set the image-rendering properties?
Thank you so much,
Matt
