Untitled
# Attempting to save the map again with adjusted settings and confirm success fig, ax = plt.subplots(figsize=(10, 8)) # Base map outline land = plt.Polygon([ (1, 1), (3, 2), (5, 1.5), (7, 2), (9, 3), (10, 5), (9, 7), (7, 8), (5, 7.5), (3, 6), (1.5, 4), (1, 3), (1, 1) ], closed=True, edgecolor="black", facecolor="#f5deb3", linewidth=2, zorder=1) ax.add_patch(land) # Add mountain ranges mountain_color = "#a9a9a9" mountains = [ [(2, 3), (3, 4), (4, 3.5)], # Northern mountains [(7, 6), (8, 5.5), (9, 6)], # Southern mountains ] for mountain in mountains: ax.plot(*zip(*mountain), color=mountain_color, linewidth=3, zorder=2) # Add rivers river_color = "#4682b4" rivers = [ [(3, 4), (4, 4.5), (5, 4), (6, 3.5)], # Main river [(2.5, 2.5), (3.5, 3), (4.5, 2.8)], # Secondary river [(6.5, 6.5), (7.5, 6), (8.5, 5.5)], # River in southern duchy ] for river in rivers: ax.plot(*zip(*river), color=river_color, linewidth=2, zorder=3) # Cities and locations locations = { "Nordhafen (Port)": (9, 3), "Goldfeld (Capital)": (6, 3.5), "Altenberg": (3, 4), "Brandenburg": (4, 5), "Waldstadt": (5, 4.5), "Lombard": (8, 6), "Alsace": (2.5, 2.5), } for name, coords in locations.items(): ax.scatter(*coords, color="red" if "Capital" in name or "Port" in name else "brown", s=100, zorder=4) ax.text(coords[0], coords[1] + 0.2, name, fontsize=9, ha="center", zorder=5) # Add seas and labels ax.fill_betweenx([0, 3], 9.5, 12, color="#87ceeb", zorder=0) # Small sea ax.fill_betweenx([0, 10], 11, 12, color="#87ceeb", zorder=0) # Larger sea ax.text(11.5, 2, "Small Sea", fontsize=10, rotation=90, color="blue") ax.text(11.5, 6, "Larger Sea", fontsize=10, rotation=90, color="blue") # Adjust layout ax.set_xlim(0, 12) ax.set_ylim(0, 10) ax.axis("off") plt.title("Map of Neuwolf and Surrounding Regions", fontsize=14) # Save the figure file_path = "/mnt/data/Neuwolf_Map_Final.png" plt.savefig(file_path) plt.close(fig) file_path
Leave a Comment