☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

pcolor

Community Support
Vahid_B
Vahid_B

Hi all
I have a numpy array of size [Number_of_time_steps,N1,N2]. I want to have a pcolor map in which I can enter the time-step number and it will update the N1xN2 pcolor map automatically. I left a question about this in Stackoverflow and somebody recommended that I use Bokeh, but I cannot see the equivalent of pcolor in Bokeh documentation. So, I was wondering if this feature is added to Bokeh, and if so, be grateful if somebody let me know about it, preferably with a simple example.
Thanks.

⌁   Link to post
Bryan
Bryan

If you just want to colormap a scalar 2d array as an image, you can use Figure.image:

  http://bokeh.pydata.org/en/latest/docs/gallery/image.html

If you specifically want individual quads for some reason, instead of an image, there is nothing in Bokeh that will do that automatically (it would make a nice addition to bokeh.charts, perhaps)

Bryan

···

On Jun 16, 2015, at 3:49 AM, Vahid S. B. <vsb.control@gmail.com> wrote:

Hi all
I have a numpy array of size [Number_of_time_steps,N1,N2]. I want to have a pcolor map in which I can enter the time-step number and it will update the N1xN2 pcolor map automatically. I left a question about this in Stackoverflow and somebody recommended that I use Bokeh, but I cannot see the equivalent of pcolor in Bokeh documentation. So, I was wondering if this feature is added to Bokeh, and if so, be grateful if somebody let me know about it, preferably with a simple example.
Thanks.

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e460e752-fb0b-4025-9d18-ceeb07d9325a%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Vahid_B
Vahid_B

Thanks! I tried figure.image. The output seems very primitive compared to pyplot.pcolor, but given the interactive options, seems to be the best that I can find. And although this is not part of the original question, but if you could guide me towards the method or class I should use to add an Edit Box to the figure.image to update its contents, I’d be much grateful.
Vahid

···

On Tuesday, 16 June 2015 12:19:47 UTC+2, Bryan Van de ven wrote:

If you just want to colormap a scalar 2d array as an image, you can use Figure.image:

    [http://bokeh.pydata.org/en/latest/docs/gallery/image.html](http://bokeh.pydata.org/en/latest/docs/gallery/image.html)

If you specifically want individual quads for some reason, instead of an image, there is nothing in Bokeh that will do that automatically (it would make a nice addition to bokeh.charts, perhaps)

Bryan

On Jun 16, 2015, at 3:49 AM, Vahid S. B. vsb.c...@gmail.com wrote:

Hi all

I have a numpy array of size [Number_of_time_steps,N1,N2]. I want to have a pcolor map in which I can enter the time-step number and it will update the N1xN2 pcolor map automatically. I left a question about this in Stackoverflow and somebody recommended that I use Bokeh, but I cannot see the equivalent of pcolor in Bokeh documentation. So, I was wondering if this feature is added to Bokeh, and if so, be grateful if somebody let me know about it, preferably with a simple example.

Thanks.

–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e460e752-fb0b-4025-9d18-ceeb07d9325a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post
Rutger_Kassies
Rutger_Kassies

In MPL, pcolor is little more than a collection/grid of polygons which share the same* edges. You can achieve a similar effect with Bokeh’s patches, see for an example:
https://groups.google.com/a/continuum.io/d/msg/bokeh/ef27EtmqaMs/kBaE6hc6hFkJ

Regards,
Rutger

*its not exactly the same, its a different edge at the same location, overplotting each other. Both in MPL and Bokeh. You would need topography support to prevent overplotting.

···

On Wednesday, June 17, 2015 at 11:39:38 AM UTC+2, Vahid S. B. wrote:

Thanks! I tried figure.image. The output seems very primitive compared to pyplot.pcolor, but given the interactive options, seems to be the best that I can find. And although this is not part of the original question, but if you could guide me towards the method or class I should use to add an Edit Box to the figure.image to update its contents, I’d be much grateful.
Vahid

On Tuesday, 16 June 2015 12:19:47 UTC+2, Bryan Van de ven wrote:

If you just want to colormap a scalar 2d array as an image, you can use Figure.image:

    [http://bokeh.pydata.org/en/latest/docs/gallery/image.html](http://bokeh.pydata.org/en/latest/docs/gallery/image.html)

If you specifically want individual quads for some reason, instead of an image, there is nothing in Bokeh that will do that automatically (it would make a nice addition to bokeh.charts, perhaps)

Bryan

On Jun 16, 2015, at 3:49 AM, Vahid S. B. vsb.c...@gmail.com wrote:

Hi all

I have a numpy array of size [Number_of_time_steps,N1,N2]. I want to have a pcolor map in which I can enter the time-step number and it will update the N1xN2 pcolor map automatically. I left a question about this in Stackoverflow and somebody recommended that I use Bokeh, but I cannot see the equivalent of pcolor in Bokeh documentation. So, I was wondering if this feature is added to Bokeh, and if so, be grateful if somebody let me know about it, preferably with a simple example.

Thanks.

–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e460e752-fb0b-4025-9d18-ceeb07d9325a%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled