{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Plotting methods: cf. matplotlib's according methods and doc" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:12.536553Z", "iopub.status.busy": "2025-01-13T11:30:12.536078Z", "iopub.status.idle": "2025-01-13T11:30:13.068016Z", "shell.execute_reply": "2025-01-13T11:30:13.067537Z" } }, "outputs": [], "source": [ "%matplotlib inline\n", "# for figures in notebook\n", "\n", "# import & initialize epygram\n", "import epygram\n", "epygram.init_env()\n", "\n", "import os\n", "INPUTS_DIR = os.path.join('..', 'inputs')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:13.070217Z", "iopub.status.busy": "2025-01-13T11:30:13.070006Z", "iopub.status.idle": "2025-01-13T11:30:13.192215Z", "shell.execute_reply": "2025-01-13T11:30:13.191709Z" } }, "outputs": [], "source": [ "# open resource in read mode\n", "r = epygram.open(os.path.join(INPUTS_DIR, 'ic.full-surfex.corsica-02km50.fa'), 'r')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:13.194239Z", "iopub.status.busy": "2025-01-13T11:30:13.194082Z", "iopub.status.idle": "2025-01-13T11:30:13.238291Z", "shell.execute_reply": "2025-01-13T11:30:13.237877Z" } }, "outputs": [], "source": [ "f = r.readfield('X001TG1')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:13.239969Z", "iopub.status.busy": "2025-01-13T11:30:13.239761Z", "iopub.status.idle": "2025-01-13T11:30:13.729886Z", "shell.execute_reply": "2025-01-13T11:30:13.729493Z" } }, "outputs": [], "source": [ "fig, ax = f.cartoplot(plot_method='pcolormesh')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:13.731954Z", "iopub.status.busy": "2025-01-13T11:30:13.731726Z", "iopub.status.idle": "2025-01-13T11:30:14.027883Z", "shell.execute_reply": "2025-01-13T11:30:14.027409Z" } }, "outputs": [], "source": [ "fig, ax = f.cartoplot(plot_method='contourf')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:14.029788Z", "iopub.status.busy": "2025-01-13T11:30:14.029597Z", "iopub.status.idle": "2025-01-13T11:30:14.274524Z", "shell.execute_reply": "2025-01-13T11:30:14.274030Z" } }, "outputs": [], "source": [ "fig, ax = f.cartoplot(plot_method='contour')" ] }, { "cell_type": "code", "execution_count": null, "metadata": { "execution": { "iopub.execute_input": "2025-01-13T11:30:14.276782Z", "iopub.status.busy": "2025-01-13T11:30:14.276595Z", "iopub.status.idle": "2025-01-13T11:30:14.590517Z", "shell.execute_reply": "2025-01-13T11:30:14.590032Z" } }, "outputs": [], "source": [ "fig, ax = f.cartoplot(plot_method='scatter')" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3 (ipykernel)", "language": "python", "name": "python3" }, "language_info": { "codemirror_mode": { "name": "ipython", "version": 3 }, "file_extension": ".py", "mimetype": "text/x-python", "name": "python", "nbconvert_exporter": "python", "pygments_lexer": "ipython3", "version": "3.10.12" } }, "nbformat": 4, "nbformat_minor": 4 }