我有一个如下的字体家族
with open('map_NL_provinces.pickle', 'rb') as f:
provinces = pickle.load(f)
with open('map_NL_cities.pickle', 'rb') as f:
cities = pickle.load(f)
# renaming key in in dict
provinces['name'] = provinces.pop('names')
provinces = ColumnDataSource(data = provinces)
# from df to CDS
cities = ColumnDataSource(data=cities[['name','x','y']])
# plot map
f.patches('x', 'y', source=provinces,
fill_color={'field': 'rate', 'transform': color_mapper},
fill_alpha=1, line_color="black", line_width=1.5)
# plot cities
f.circle(x='x', y='y', source=cities, size=12, color=palette[3])
def callback_cities(attr, old, new):
# This uses syntax for Bokeh >= 0.12.15
print("Names of selected circles: {}".format(cities.data['name'][cities.selected.indices]))
print("Indices of selected circles: ", cities.selected.indices)
f.title.text=str(cities.data['name'][cities.selected.indices])
def callback_provinces(attr, old, new):
# This uses syntax for Bokeh >= 0.12.15
print("Names of selected provinces: {}".format(provinces.data['name'][provinces.selected.indices]))
print("Indices of selected provinces: ", provinces.selected.indices)
f.title.text=str(provinces.data['name'][provinces.selected.indices])
cities.on_change('selected', callback_cities)
provinces.on_change('selected', callback_provinces)
我似乎无法在TextViews中访问权重为600的半粗体类型。我该怎么办?
我做了围绕调整TextView的权重和textStyle属性的实验,尚无法解决问题。我浏览了官方文档here,似乎没有指定任何此类内容。
如果有人可以提供任何见解,将会提供巨大的帮助。