diff --git a/.DS_Store b/.DS_Store index d24ffef..9c33632 100644 Binary files a/.DS_Store and b/.DS_Store differ diff --git a/p1/latitude_effects.png b/p1/latitude_effects.png index df2060e..9655f7d 100644 Binary files a/p1/latitude_effects.png and b/p1/latitude_effects.png differ diff --git a/p1/specific_energy_comparison.py b/p1/specific_energy_comparison.py index b73e384..e4b38da 100644 --- a/p1/specific_energy_comparison.py +++ b/p1/specific_energy_comparison.py @@ -551,7 +551,22 @@ def plot_latitude_effects( # Plot continuous curve ax.plot(latitudes, fuel_ratios, 'g-', linewidth=2, label='Fuel Ratio vs Latitude') - # Mark launch sites + # Mark launch sites with custom offsets to avoid overlap with curve + # Offsets: (x, y) in points - positive y moves text up, positive x moves right + label_offsets = { + '赤道': (5, -15), # Below curve + 'Kourou': (5, 8), # Above curve + 'SDSC': (5, -15), # Below curve + 'Texas': (-50, 8), # Left and above + 'Florida': (5, 8), # Above curve + 'California': (-60, -8), # Left + 'Virginia': (5, 8), # Above curve + 'Taiyuan': (-45, -12), # Left and below + 'Mahia': (5, 8), # Above curve + 'Alaska': (5, -15), # Below curve + 'Baikonur': (5, 8), # Above curve + } + for name, site in LAUNCH_SITES.items(): abs_lat = abs(site.latitude) site_temp = LaunchSite(site.name, abs_lat) @@ -559,12 +574,14 @@ def plot_latitude_effects( ax.plot(abs_lat, result['fuel_ratio'], 'mo', markersize=8) # Simplified label label = site.name.split('(')[0].strip() + # Get custom offset for this site, default to (5, 8) + offset = label_offsets.get(name, (5, 8)) ax.annotate(label, (abs_lat, result['fuel_ratio']), - textcoords="offset points", xytext=(3, 3), fontsize=8, rotation=15) + textcoords="offset points", xytext=offset, fontsize=11) ax.set_xlabel('Latitude |φ| (°)', fontsize=12) ax.set_ylabel('Fuel / Payload Mass Ratio', fontsize=12) - ax.set_title(f'Fuel Requirement vs Launch Latitude{title_suffix}', fontsize=13) + # ax.set_title(f'Fuel Requirement vs Launch Latitude{title_suffix}', fontsize=13) ax.grid(True, alpha=0.3) ax.set_xlim(0, 65)