SergeyO7 commited on
Commit
621c2f9
·
verified ·
1 Parent(s): e67f755

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -108,20 +108,18 @@ def PLadder_ZSizes(utc_dt, lat, lon):
108
  return {'PLadder': PLadder, 'ZSizes': ZSizes, 'longitudes': longitudes}
109
 
110
  def plot_pladder(PLadder):
111
- """Plot the Planetary Ladder with symbols outside the triangle."""
112
  fig, ax = plt.subplots()
113
- # Plot triangle
114
- ax.plot([0, 0, 3, 0], [0, 3, 0, 0], 'k-')
115
- # Horizontal lines within triangle
116
- ax.plot([0, 2], [1, 1], 'k--')
117
- ax.plot([0, 1], [2, 2], 'k--')
118
- # Symbol positions outside the triangle
119
- positions = [
120
- (-0.2, 0), (-0.2, 1), (-0.2, 2), (-0.2, 3), # Symbols 1 to 4
121
- (1.2, 2.2), (2.2, 1.2), (3.2, 0.2) # Symbols 5 to 7
122
- ]
123
  for i, (x, y) in enumerate(positions):
124
  ax.text(x, y, planet_symbols[PLadder[i]], ha='center', va='center', fontsize=24)
 
125
  ax.set_xlim(-0.5, 3.5)
126
  ax.set_ylim(-0.5, 3.5)
127
  ax.set_aspect('equal')
 
108
  return {'PLadder': PLadder, 'ZSizes': ZSizes, 'longitudes': longitudes}
109
 
110
  def plot_pladder(PLadder):
 
111
  fig, ax = plt.subplots()
112
+ # Plot the triangle
113
+ ax.plot([0, 1.5, 3, 0], [0, 3, 0, 0], 'k-')
114
+ # Plot horizontal lines within the triangle
115
+ ax.plot([0.5, 2.5], [1, 1], 'k--')
116
+ ax.plot([1, 2], [2, 2], 'k--')
117
+ # Define symbol positions outside the triangle
118
+ positions = [(-0.2,0), (0.3,1), (0.8,2), (1.3,3), (2.2,2.2), (2.7,1.2), (3.2,0.2)]
119
+ # Plot planet symbols
 
 
120
  for i, (x, y) in enumerate(positions):
121
  ax.text(x, y, planet_symbols[PLadder[i]], ha='center', va='center', fontsize=24)
122
+ # Set plot limits and aesthetics
123
  ax.set_xlim(-0.5, 3.5)
124
  ax.set_ylim(-0.5, 3.5)
125
  ax.set_aspect('equal')