I have some trouble with greyscale plotting. The data for the plot shown in this example is a 256x256 greyscale 2d-numpy-array with 16bit resolution.
1.) I would like to to make the plot look like the right picture with higher greyscale resolution. How can I achieve that?
2) Within the “figure” function I can define the size of the plot, but actually it is not the size of the plot but the size of the canvas element.
I would like to have the image-area itself with 256x256 without the white borders around them. Is there a setting to disable the border?
Regarding your second point, try adding “p.min_border = 0”. Note that there still seems to be a 1px border drawn over the outer pixels of the data.
Regards,
Rutger
···
On Saturday, August 1, 2015 at 5:36:28 AM UTC+2, kju factor wrote:
Hello everyone,
I have some trouble with greyscale plotting. The data for the plot shown in this example is a 256x256 greyscale 2d-numpy-array with 16bit resolution.
1.) I would like to to make the plot look like the right picture with higher greyscale resolution. How can I achieve that?
2) Within the “figure” function I can define the size of the plot, but actually it is not the size of the plot but the size of the canvas element.
I would like to have the image-area itself with 256x256 without the white borders around them. Is there a setting to disable the border?
I have some trouble with greyscale plotting. The data for the plot shown in this example is a 256x256 greyscale 2d-numpy-array with 16bit resolution.
1.) I would like to to make the plot look like the right picture with higher greyscale resolution. How can I achieve that?
2) Within the “figure” function I can define the size of the plot, but actually it is not the size of the plot but the size of the canvas element.
I would like to have the image-area itself with 256x256 without the white borders around them. Is there a setting to disable the border?
so here is the solution that worls for me:
I was confused, because the description of the “image” method of the bokeh plotting Interface says the argument has to be colorMapper=“Your-LCM-Object” but actually it has to be color_mapper=“Your-LCM-Object”.
I have some trouble with greyscale plotting. The data for the plot shown in this example is a 256x256 greyscale 2d-numpy-array with 16bit resolution.
1.) I would like to to make the plot look like the right picture with higher greyscale resolution. How can I achieve that?
2) Within the “figure” function I can define the size of the plot, but actually it is not the size of the plot but the size of the canvas element.
I would like to have the image-area itself with 256x256 without the white borders around them. Is there a setting to disable the border?
Thanks for the report. If you feel so, next time you can also open an issue or propose a PR with a fix.
Cheers
Fabio
···
On Wed, Aug 5, 2015 at 11:40 PM, kju factor [email protected] wrote:
Hello,
so here is the solution that worls for me:
I was confused, because the description of the “image” method of the bokeh plotting Interface says the argument has to be colorMapper=“Your-LCM-Object” but actually it has to be color_mapper=“Your-LCM-Object”.
I have some trouble with greyscale plotting. The data for the plot shown in this example is a 256x256 greyscale 2d-numpy-array with 16bit resolution.
1.) I would like to to make the plot look like the right picture with higher greyscale resolution. How can I achieve that?
2) Within the “figure” function I can define the size of the plot, but actually it is not the size of the plot but the size of the canvas element.
I would like to have the image-area itself with 256x256 without the white borders around them. Is there a setting to disable the border?
Colormapping is a cool thing and it is easy with the LinearColormapper.
Anyway, I have to map some colors in a non linear way. How can I do that in bokeh?
This example shows how the Linear Color Mapper works internally:
x < 0 : 'red' # values < low are clamped
0 >= x < 33 : 'red'
33 >= x < 66 : 'green'
66 >= x < 99 : 'blue'
99 >= x : 'blue' # values > high are clamped
``
Can I somehow specify my own color ranges like so?