tcra.plot package
Submodules
tcra.plot.mapplot module
The tcra plot_scatter and plot_interactive_map funtions to plot results
- plot_interactive_map(node, node_attribute=None, node_size=5, node_cmap_bins='cut', node_cmap=None, link_cmap=None)[source]
this function allows user to plot results interactively on OpenStreetMap.
- Parameters:
node – building invetory with result
node_size – size of doc plot
node_attribute – the attribute to plot
- Returns:
interactive map plotting on OpenStreetMap
- Return type:
m
- plot_scatter(plot_data, x_col, y_col, color_col, figsize=(4, 3), color_map=None, s=0.5, xlabel='longitude', ylabel='latitude', colorbar_label='pf', save_path=None)[source]
Plots a scatter plot from the given DataFrame with specified x, y, and color columns.
- Parameters:
(pd.DataFrame) (plot_data) – DataFrame containing the data
(str) (colorbar_label) – Column name for x coordinates
(str) – Column name for y coordinates
(str) – Column name for coloring the scatter points
(tuple) (figsize) – Size of the figure (width, height)
color_map – Colormap to use for the scatter plot (default is a predefined colormap)
(float) (s) – Marker size
(str) – Label for the x-axis
(str) – Label for the y-axis
(str) – Label for the color bar
- Returns:
save_path (str) – Path to save the figure (default is None, meaning not saving the figure)
plt.show() – plotting map