Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Submitting colours as tuples results in no colour plots in server session. #3787

Closed
copperwire opened this issue Jan 29, 2016 · 1 comment
Closed

Comments

@copperwire
Copy link

When pushing a set of tabs with line elements to a bokeh server you get grayscale lines if colours were specified in touples.

Rough example:

from bokeh.plotting import figure, curdoc
from bokeh.models.widgets import Panel, Tabs 
from bokeh.client import push_session

import numpy as np

tabs = []

x = np.linspace(-2*np.pi, 2*np.pi, 200)

colour_list = [(51, 153, 51) ,(153, 51, 51), (51, 51, 153), (153, 51,153 ), (153, 51, 51)]

y = np.sin(x)
w = np.cos(x)

z = np.arcsin(x)
u = np.arccos(x)

v = np.arctan(x)
r = np.tan(x)

list_of_axis = [(y,w), (z, u), (v,r)]


for two in list_of_axis: 

    figure_obj = figure(plot_width = 1000, plot_height = 800)   
    figure_obj.line(x, two[0], line_width = 2, line_color = colour_list[3])
    figure_obj.line(x, two[1], line_width = 2, line_color = colour_list[1])

    tabs.append(Panel(child = figure_obj, title = "two by two"))

tabs = Tabs(tabs = tabs)
session = push_session(curdoc(), url = "http://localhost:1027")
session.show()
@canavandl
Copy link
Contributor

Hi @copperwire

This defect and a suggested work-around are discussed in #2622, so I'm going to mark/close this issue as a duplicate. If the work-around doesn't solve your issue, please reopen this issue and we'll figure out a fix.

Thanks for submitting an issue!

@canavandl canavandl changed the title Submitting colours as touples results in no colour plots in server session. Submitting colours as tuples results in no colour plots in server session. Feb 20, 2016
@damianavila damianavila added this to the 0.12 milestone Feb 25, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants