Skip to content
Snippets Groups Projects
Commit 17b54f86 authored by Julian Stürmer's avatar Julian Stürmer
Browse files

Add control of x-, y-ticks in plot_pg_map

parent 72678f50
No related branches found
No related tags found
No related merge requests found
......@@ -122,12 +122,16 @@ function plot_pg_map(
### Show longitude and latitude values
gl = ax.gridlines(crs=cartopy.crs.PlateCarree(), draw_labels=true)
gl.xlabels_top = false
gl.ylabels_right = false
gl.top_labels = false # xlabels_top
gl.right_labels = false # ylabels_right
gl.xlines = false
gl.ylines = false
gl.xformatter = cartopy.mpl.gridliner.LONGITUDE_FORMATTER
gl.yformatter = cartopy.mpl.gridliner.LATITUDE_FORMATTER
mticker = pyimport("matplotlib.ticker")
gl.xlocator = mticker.FixedLocator([-105, -103, -101, -99, -97, -95])
gl.ylocator = mticker.FixedLocator([26, 28, 30, 32, 34, 36])
# gl.xlocator = mticker.FixedLocator([-105, -102, -99, -96])
_plot_pg!(ax, network_data, settings, figpath, wind)
......@@ -227,7 +231,7 @@ function _draw_pg!(
if settings["draw_legend"] == true
all_markers = vcat(bus_markers, br_markers)
all_labels = vcat(bus_labels, br_labels)
plt.legend(all_markers, all_labels)
plt.legend(all_markers, all_labels) # loc="lower left",
end
return ax, G
......@@ -454,7 +458,7 @@ function _draw_br_branchloads!(
sm = plt.cm.ScalarMappable(cmap=cmap, norm=plt.Normalize(vmin, vmax))
cbar = plt.colorbar(sm)
cbar.ax.set_ylabel(
"Line $br_coloring " * L"$F_{ij}/C_{ij}$", rotation=-90, va="bottom"
"Line $br_coloring " * L"$S_{ij}/C_{ij}$", rotation=-90, va="bottom"
)
return G, [], [], cbar
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment