Skip to content

Commit 19221a3

Browse files
generate zoomed out and in versions
1 parent a817eed commit 19221a3

4 files changed

Lines changed: 17 additions & 13 deletions

docs/Fervo_Project_Red.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@
55
[Fervo_Project_Red-2026 example web interface link](https://gtp.scientificwebservices.com/geophires/?geophires-example-id=Fervo_Project_Red-2026)
66

77

8-
![](_images/fervo_project_red-2026_production-temperature-data-vs-modeling.png)
8+
![](_images/fervo_project_red-2026_production-temperature-data-vs-modeling-1.png)
9+
![](_images/fervo_project_red-2026_production-temperature-data-vs-modeling-2.png)
910

1011

1112
---
143 KB
Loading

docs/_images/fervo_project_red-2026_production-temperature-data-vs-modeling.png renamed to docs/_images/fervo_project_red-2026_production-temperature-data-vs-modeling-2.png

File renamed without changes.

src/geophires_docs/generate_fervo_project_red_2026_docs.py

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
_PRODUCTION_CSV_FILENAME = 'project_red_2026_production_data.csv'
2323
_MODEL_CSV_FILENAME = 'project_red_2026_model_data.csv'
2424
_STEADY_STATE_CSV_FILENAME = 'project_red_2026_variance_analysis.csv'
25-
_REGENERATED_GRAPH_FILENAME = 'fervo_project_red-2026_production-temperature-data-vs-modeling.png'
25+
_GENERATED_GRAPH_FILENAME_STEM = 'fervo_project_red-2026_production-temperature-data-vs-modeling'
2626

2727
_STEADY_STATE_START_YEARS = 0.041625
2828

@@ -235,7 +235,7 @@ def _generate_production_temperature_comparison_graph(
235235
production_csv_path: Path,
236236
model_csv_path: Path,
237237
steady_state_csv_path: Path,
238-
output_path: Path,
238+
output_path_stem: Path,
239239
steady_state_start_years: float = _STEADY_STATE_START_YEARS,
240240
geophires_data: pd.Series | None = None,
241241
) -> None:
@@ -323,18 +323,21 @@ def _generate_production_temperature_comparison_graph(
323323

324324
ax.set_xlim(0.0, 2.0)
325325

326+
ax.grid(True, linestyle='--', alpha=0.5)
327+
328+
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), ncol=1, frameon=False, fontsize=11)
329+
330+
output_path_stem.parent.mkdir(parents=True, exist_ok=True)
331+
332+
ax.set_ylim(0.0, 200.0)
333+
fig.savefig(f'{output_path_stem}-1.png', dpi=150, bbox_inches='tight')
334+
326335
ax.set_ylim(
327-
# 0.0, 200.0 # TODO generate zoomed out version as well
328336
175,
329337
185,
330338
)
339+
fig.savefig(f'{output_path_stem}-2.png', dpi=150, bbox_inches='tight')
331340

332-
ax.grid(True, linestyle='--', alpha=0.5)
333-
334-
ax.legend(loc='upper center', bbox_to_anchor=(0.5, -0.12), ncol=1, frameon=False, fontsize=11)
335-
336-
output_path.parent.mkdir(parents=True, exist_ok=True)
337-
fig.savefig(output_path, dpi=150, bbox_inches='tight')
338341
plt.close(fig)
339342

340343

@@ -380,7 +383,7 @@ def generate_fervo_project_red_2026_docs():
380383
production_csv_path_ = _BUILD_DIR / _PRODUCTION_CSV_FILENAME
381384
model_csv_path_ = _BUILD_DIR / _MODEL_CSV_FILENAME
382385
steady_state_csv_path = _BUILD_DIR / _STEADY_STATE_CSV_FILENAME
383-
regenerated_graph_path = _get_file_path(f'../../docs/_images/{_REGENERATED_GRAPH_FILENAME}')
386+
generated_graph_path_stem = _get_file_path(f'../../docs/_images/{_GENERATED_GRAPH_FILENAME_STEM}')
384387

385388
_log.info('Extracting data from image...')
386389
df_actual, df_model_ = extract_plot_data(IMAGE_PATH, PRODUCTION_IMAGE_PATH)
@@ -412,10 +415,10 @@ def generate_fervo_project_red_2026_docs():
412415
production_csv_path_,
413416
model_csv_path_,
414417
steady_state_csv_path,
415-
regenerated_graph_path,
418+
generated_graph_path_stem,
416419
geophires_data=get_project_red_production_temperature_profile_series(df_model_),
417420
)
418-
_log.info(f'Wrote regenerated graph: {regenerated_graph_path}')
421+
_log.info(f'Wrote regenerated graph: {generated_graph_path_stem}')
419422

420423

421424
if __name__ == '__main__':

0 commit comments

Comments
 (0)