Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- mapper = LinearColorMapper(palette=Magma256, high=df_complete.score.max(), low=df_complete.score.min())
- TOOLS = "hover, save, pan, box_zoom, undo, redo, reset, wheel_zoom"
- p = figure(title="Heatmap of Sites", x_range=Position, y_range=Values,
- x_axis_location="above", plot_width=900, plot_height=400,
- tools=TOOLS, toolbar_location='below',
- tooltips=[('Position','@Position'),('Score', '@score'), ('Sequence', '@Sequence')])
- p.grid.grid_line_color = None
- p.axis.axis_line_color = None
- p.axis.major_tick_line_color = None
- p.axis.major_label_text_font_size = "8pt"
- p.axis.major_label_standoff = 0
- p.xaxis.major_label_orientation = pi / 3
- p.xaxis.ticker = ContinuousTicker(desired_num_ticks = 50) ###
- p.rect(x="Position", y="Values", width=1, height=1,
- source=df_complete,
- fill_color={'field':'score', 'transform' : mapper},
- line_color=None)
- color_bar = ColorBar(color_mapper=mapper, major_label_text_font_size="8pt",
- ticker=BasicTicker(),
- label_standoff=6, border_line_color=None, location=(0, 0))
- p.add_layout(color_bar, 'right')
- show(p)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement