BlockVis Class
A class for creating block visualizations using Plotly.
- param None:
- sckan_compare.blockvis.BlockVis.SCALE
Scaling factor for visualization.
- Type:
int
- sckan_compare.blockvis.BlockVis.MAX_Y
Maximum Y coordinate.
- Type:
int
- sckan_compare.blockvis.BlockVis.MAX_X
Maximum X coordinate.
- Type:
int
- sckan_compare.blockvis.BlockVis.icons
Dictionary of icons for nodes.
- Type:
dict
- sckan_compare.blockvis.BlockVis.fig
Plotly figure widget for visualization.
- Type:
go.FigureWidget
- __init__():
Initialize the BlockVis class.
- interpolate_coordinates(point1, point2, resolution=0.1):
Interpolate between two cartesian coordinates.
- plot_figure(df, region_A, region_B):
Plot the connectivity block visualization
- update_graph():
Update the layout of the figure.
- draw_block_bg(x0, y0, x1, y1, opacity, color):
Draw a rectangular background block.
- draw_image(icon, x, y):
Draw an image on the visualization.
- draw_connections(x, y, label, color):
Draw connections between nodes.
- add_text(x, y, text, fontsize=20):
Add text annotation to the visualization.
- mark_node(x, y, label):
Mark a node on the visualization.
- show_figure():
Display the Plotly figure widget.
- get_figure():
Get the Plotly figure widget.