本文整理汇总了Python中shapely.geometry.Polygon.circle_cross方法的典型用法代码示例。如果您正苦于以下问题:Python Polygon.circle_cross方法的具体用法?Python Polygon.circle_cross怎么用?Python Polygon.circle_cross使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类shapely.geometry.Polygon
的用法示例。
在下文中一共展示了Polygon.circle_cross方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: ColumnDataSource
# 需要导入模块: from shapely.geometry import Polygon [as 别名]
# 或者: from shapely.geometry.Polygon import circle_cross [as 别名]
country_colors = [bokehcolors[numpy.where(classes==classlab)[0][0]] for classlab in classlabs]
# bokeh interactive plot
source = ColumnDataSource(data=dict(
x=data_x,
y=data_y,
name=countries,
info = [[df['Culture'].iloc[ind], df['Language'].iloc[ind], df['Genre_Album'].iloc[ind]] for ind in range(n_samples)],
url=numpy.array(df['songurls_Album'].get_values(), dtype=str),
color = country_colors
))
TOOLS="wheel_zoom,box_zoom,pan,reset,save,resize"
p = figure(tools=TOOLS, plot_width=1200, title="")
r1 = p.patches(pp_x, pp_y, fill_color='white', line_width=0.4, line_color='grey')
r2 = p.circle_cross('x','y', size=4, line_color=country_colors, source=source)
r3 = p.multi_line(xs=line_x, ys=line_y, alpha=0.5, color='grey', line_width=0.2)
# some interactive functionality on mouse click and mouse over
callback = CustomJS(args=dict(r2=r2), code="""
var inds = cb_obj.get('selected')['1d'].indices;
var d1 = cb_obj.get('data');
url = d1['url'][inds[0]];
if (url){
window.open(url);}""")
hover_tooltips = """
<div>
<div>
<span style="font-size: 17px; font-weight: bold;">@name</span>
</div>
<div>