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

alpha not treated correctly as a data spec #271

Closed
bryevdv opened this issue Jan 14, 2014 · 1 comment
Closed

alpha not treated correctly as a data spec #271

bryevdv opened this issue Jan 14, 2014 · 1 comment
Milestone

Comments

@bryevdv
Copy link
Member

bryevdv commented Jan 14, 2014

The following code should produce patches with a range of alphas, but does not.

from bokeh.sampledata import us_counties, unemployment
from bokeh.plotting import *
from numpy import linspace

county_xs=[
    us_counties.data[code]['lons'] for code in us_counties.data
    if us_counties.data[code]['state'] == 'tx'
]
county_ys=[
    us_counties.data[code]['lats'] for code in us_counties.data
    if us_counties.data[code]['state'] == 'tx'
]

county_alphas = linspace(0, 1.0, len(county_xs))

output_file("test.html")

patches(county_xs, county_ys, fill_color="black", fill_alpha=list(county_alphas),
    line_color="white", line_width=0.5, title="Texas Unemployment 2009")

show()
bryevdv referenced this issue Jan 14, 2014
added alpha propertes and line_width as DataSpecs
@bryevdv
Copy link
Member Author

bryevdv commented Jan 14, 2014

This is now fixed, see attached screenshot

screen shot 2014-01-14 at 1 58 09 pm

@bryevdv bryevdv closed this as completed Jan 14, 2014
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

1 participant