Skip to content

Commit

Permalink
Merge pull request #127 from jukent/snake_case
Browse files Browse the repository at this point in the history
Consistent function naming convention
  • Loading branch information
jukent authored May 20, 2023
2 parents 5a0aa0f + b04cabf commit 7a76fb8
Show file tree
Hide file tree
Showing 5 changed files with 422 additions and 60 deletions.
10 changes: 4 additions & 6 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@
#
# -- Project information -----------------------------------------------------

import datetime
import geocat.viz as gv
import os
import sys
import pathlib
Expand All @@ -22,8 +24,6 @@

print("sys.path:", sys.path)

import geocat.viz as gv

LOGGER = logging.getLogger("conf")

try:
Expand Down Expand Up @@ -128,7 +128,7 @@ def __getattr__(cls, name):

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
# source_suffix = ['.rst', '.md']
#source_suffix = ['.rst', '.md']
source_suffix = {
'.rst': 'restructuredtext',
'.ipynb': 'myst-nb',
Expand All @@ -144,8 +144,6 @@ def __getattr__(cls, name):
# General information about the project.
project = u'GeoCAT-viz'

import datetime

current_year = datetime.datetime.now().year
copyright = u'{}, University Corporation for Atmospheric Research'.format(
current_year)
Expand Down Expand Up @@ -326,7 +324,7 @@ def __getattr__(cls, name):
nb_execution_mode = "off"

# generate warning for all invalid links
# nitpicky = True
#nitpicky = True


# Allow for changes to be made to the css in the theme_overrides file
Expand Down
19 changes: 16 additions & 3 deletions docs/user_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,25 @@ GeoCAT-viz Utility Functions

set_map_boundary

findLocalExtrema
find_local_extrema

plotCLabels
plot_contour_labels

plotELabels
plot_extrema_labels

set_vector_density

get_skewt_vars

Deprecated Functions
--------------------
Util
^^^^^^^^^^^^^
.. currentmodule:: geocat.viz.util
.. autosummary::
:nosignatures:
:toctree: ./generated/

findLocalExtrema
plotCLabels
plotELabels
100 changes: 100 additions & 0 deletions gallery/util/add_height_from_pressure_axis.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [],
"source": [
"# Import Packages:\n",
"\n",
"import numpy as np\n",
"import xarray as xr\n",
"import matplotlib.pyplot as plt\n",
"from matplotlib.ticker import ScalarFormatter\n",
"import cmaps\n",
"import metpy.calc as mpcalc\n",
"from metpy.units import units\n",
"\n",
"import scipy\n",
"\n",
"#import geocat.datafiles as gdf\n",
"import geocat.viz as gv"
]
},
{
"cell_type": "raw",
"metadata": {},
"source": [
"# Open a netCDF data file using xarray default engine and load the data into xarrays\n",
"ds = xr.open_dataset(gdf.get(\"netcdf_files/mxclim.nc\"))\n",
"\n",
"# Extract variables\n",
"U = ds.U[0, :, :]"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/png": "iVBORw0KGgoAAAANSUhEUgAAAscAAAKTCAYAAAD16aXPAAAAOXRFWHRTb2Z0d2FyZQBNYXRwbG90bGliIHZlcnNpb24zLjUuMCwgaHR0cHM6Ly9tYXRwbG90bGliLm9yZy8/fFQqAAAACXBIWXMAAA9hAAAPYQGoP6dpAAAm0ElEQVR4nO3de3CV9Z348c+BYEAEagQxkoBAFQ3eA1FxLegqjF21yjLq2kHb6mxxqYWl9YqrLeOOl13RaqNr6w1n1MUbbsfBC2UNYu0satGq0alyTVREYOQSQQSe3x/9kl+5Kbmf4Os1k5me5zznfD/0O9i3T895ksuyLAsAACA6tPUAAACQL8QxAAAk4hgAABJxDAAAiTgGAIBEHAMAQCKOAQAgKWjrARpq06ZNMX/+/Ojdu3d06KDtAQDyzZYtW+KTTz6JY445JgoK2ldutq9pI2L+/PlRUVHR1mMAAPA15s2bF0OHDm3rMRqk3cVx7969I+Kv/2UXFxe38TQAAGzv448/joqKivpua0/aXRxv/ShFcXFxlJSUtPE0AADsSnv8CGz7mxgAAFqIOAYAgEQcAwBAIo4BACARxwAAkIhjAABIxDEAACTiGAAAEnEMAACJOAYAgEQcAwBAIo4BACARxwAAkIhjAABIxDEAACTi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hjAABIxDEAACTiGAAAEnEMAACJOAYAgEQcAwBAIo4BACARxwAAkIhjAABIxDEAACTiGAAAEnEMAACJOAYAgEQcAwBAIo4BACARxwAAkIhjAABIxDEAACTiGAAAEnEMAACJOAYAgEQcAwBAIo4BACARxwAAkIhjAABIxDEAACQFbT0AAAB8neXLl8eSJUvi008/jfXr10fPnj2jV69eMWjQoOjYsWOzrSOOAQDIS7NmzYrp06fHSy+9FAsWLNjpOXvvvXccf/zxMWrUqBg7dmz07t27SWvmsizLmvQOray2tjZKS0ujpqYmSkpK2nocAAC205Re27BhQ9x5551x9913x5IlS2Jrqnbp0iX233//KCoqii5dusSqVati1apVsXz58oiIyOVyUVBQEGeccUZcc801UV5e3qjZXTkGACAv3H///XH99dfHhx9+GIWFhXHWWWfFGWecERUVFTF48ODo0GHHr8utWrUq5s2bFy+//HI89thjMWPGjHj66afj3HPPjZtuuin69evXoBlcOQYAoFk1ttc6dOgQAwYMiCuuuCLOP//86N69e4PXfv311+OOO+6IRx99NK699tq47rrrGvR6V44BAMgL06ZNiwsuuKBJX7ArLy+PadOmxS9+8Yuora1t8OvbTRxXVlZGZWVlbNy4sa1HAQCgBYwdO7bZ3qt///7Rv3//Br+u3dznePz48VFdXR1VVVVtPQoAAHuodhPHAADQ0trNxyoAAPjmev755+O5556LhQsXxrp162JX95TI5XIxe/bsRq8jjgEAyFtr1qyJs88+O+bMmbPLIP5buVyuSeuJYwAA8taVV14ZVVVVUVRUFP/8z/8cxxxzTPTq1avJEbwr4hgAgLz11FNPRadOnWLOnDkxePDgFl/PF/IAAMhbdXV1MWjQoFYJ4whxDABAHjv00ENj/fr1rbaeOAYAIG+NHz8+FixY0Gq/60IcAwCQt374wx/GZZddFqNHj44777wz1q1b16Lr+UIeAAB57ZZbbomampqYOHFiTJw4MXr16hV77733Ts/N5XKxYMGCRq8ljgEAyFuffPJJnHrqqVFdXV1/n+Ply5fv8nz3OQYAYI915ZVXxjvvvBPf/va34/LLL4+jjz7afY4BAPhmeu6556Jz585RVVUVBx54YIuv5wt5AADkrbq6ujj00ENbJYwjxDEAAHnsiCOOiJUrV7baeuIYAIC8dfnll0dNTU089thjrbKeOAYAIG+dc845cccdd8Qll1wSP/vZz+Kdd96JDRs2tNh6vpAHAEDe6tixY/1/vv322+P222//yvNzuVxs2rSp0euJYwAA8tbWexu31PnbE8cAAOStLVu2tOp6PnMMAACJOAYAIG+9+eabDTr/rrvuatJ64hgAgLw1atSoeP/993fr3Ntuuy0uu+yyJq0njgEAyFvLly+P0047LWpqar7yvJtuuil+9rOfRdeuXZu0njgGACBv3XLLLbF06dI49dRTY/ny5Ts95xe/+EVcc8010a1bt3j22WebtJ44BgAgb/385z+Pa6+9Nt5///0YOXJkfPbZZ9s8f/XVV8eUKVOiR48eMWvWrDjxxBObtJ44BgAgr02ZMiUuu+yy+POf/xynn3561NXVRUTEpEmT4uabb46ioqKYPXt2VFRUNHkt9zkGACDv/epXv4o1a9bEtGnT4swzz4xBgwbFPffcE7169Yrf//73ccQRRzTLOuIYAIB24b777ou1a9fGU089FXPmzIkDDjggZs+eHYcddlizrSGOAQDIC0uXLv3ac2688cZYvHhxLFiwIB566KHo2rXrDq/r27dvo2cQxwAA5IWDDjoocrncbp8/atSoHY7lcrnYtGlTo2cQxwAA5IW+ffs2KI5bgjgGACAvLF68uK1HcCs3AADYShwDAEAijgEAyAu1tbXN+n4fffRRg18jjgEAyAsDBw6MSy+9NJYsWdLo99iyZUs88sgjMXjw4Lj33nsb/HpxDABAXvje974X99xzTwwcODD+/u//Pu69997duvr75ZdfxiuvvBITJkyIPn36xNixY2P16tVx0kknNXgGd6sAACAvPPbYY/Hqq6/GVVddFS+++GJUVVVFRERxcXGUl5dHcXFxFBUVRWFhYXz22WexatWqePfdd+Ott96KjRs3RpZlse+++8YNN9wQEydOjC5dujR4BnEMAEDeGDp0aMyePTvee++9uOeee+Lxxx+Pjz76qP4K8tb7IGdZVv+aTp06xfDhw+Piiy+OMWPGRGFhYaPXz2V/+87tQG1tbZ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UlKSjRkzJnvnnXeyOXPmZAcffHB2ySWXtNUfgQZo6H4/8MADWUFBQXbXXXdlCxYsyF5++eVsyJAhWUVFRVv9EWiAtWvXZvPnz8/mz5+fRUQ2derUbP78+fW37mvPvZZ3cZxlWVZZWZn169cv22uvvbJjjz02mzNnTv1zF110UTZ8+PBtzq+qqsqOOeaYbK+99soOOuig7O67727liWmKhuz38OHDs4jY4eeiiy5q/cFplIb+/f5b4rj9aeh+v/vuu9mpp56adenSJSspKckmTZqUff755608NY3V0P2+4447srKysqxLly5ZcXFx9v3vfz+rra1t5alpjBdffPEr//e4PfdaLsv8fxcAABCRZ585BgCAtiSOAQAgEccAAJCIYwAASMQxAAAk4hgAABJxDAAAiTgGAIBEHAMAQCKOAQAgEccAAJD8P07w49W+NtKxAAAAAElFTkSuQmCC",
"text/plain": [
"<Figure size 800x800 with 2 Axes>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"# Generate figure (set its size (width, height) in inches) and axes\n",
"plt.figure(figsize=(8, 8))\n",
"ax = plt.axes()\n",
"\n",
"# Set y-axis to have log-scale\n",
"plt.yscale('log')\n",
"\n",
"# Specify which contours should be drawn\n",
"levels = np.linspace(-55, 55, 23)\n",
"\n",
"# Plot contour lines\n",
"lines = U.plot.contour(ax=ax,\n",
" levels=levels,\n",
" colors='black',\n",
" linewidths=0.5,\n",
" linestyles='solid',\n",
" add_labels=False)\n",
"\n",
"# Create second y-axis to show geo-potential height.\n",
"axRHS = gv.add_height_from_pressure_axis(ax, heights=[4, 8])\n",
"\n",
"plt.show();"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "geocat_viz_build",
"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.0"
},
"orig_nbformat": 4
},
"nbformat": 4,
"nbformat_minor": 2
}
38 changes: 19 additions & 19 deletions src/geocat/viz/taylor.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,20 +159,20 @@ def __init__(self,
self.ax = ax.get_aux_axes(tr) # Polar coordinates

# Add reference point stddev contour
t = np.linspace(0, np.pi / 2)
r = np.zeros_like(t) + self.refstd
h, = self.ax.plot(t,
r,
linewidth=1,
linestyle=(0, (9, 5)),
color='black',
zorder=1)
t_array = np.linspace(0, np.pi / 2)
r_array = np.zeros_like(t_array) + self.refstd
h_plot, = self.ax.plot(t_array,
r_array,
linewidth=1,
linestyle=(0, (9, 5)),
color='black',
zorder=1)

# Set aspect ratio
self.ax.set_aspect('equal')

# Store the reference line
self.referenceLine = h
self.referenceLine = h_plot

# Collect sample points for latter use (e.g. legend)
self.modelMarkerSet = []
Expand Down Expand Up @@ -317,8 +317,8 @@ def add_model_set(self,
else:
label = kwargs.get('label')
if percent_bias_on:
handle = plt.scatter(1, 2, color=color, label=label)
self.modelMarkerSet.append(handle)
plot_handle = plt.scatter(1, 2, color=color, label=label)
self.modelMarkerSet.append(plot_handle)

# Annotate model markers if annotate_on is True
if annotate_on:
Expand Down Expand Up @@ -461,15 +461,15 @@ def add_ygrid(self,
- `NCL_taylor_2.py <https://geocat-examples.readthedocs.io/en/latest/gallery/TaylorDiagrams/NCL_taylor_2.html?highlight=add_ygrid>`_
"""

t = np.linspace(0, np.pi / 2)
t_array = np.linspace(0, np.pi / 2)
for value in arr:
r = np.zeros_like(t) + value
h, = self.ax.plot(t,
r,
color=color,
linestyle=linestyle,
linewidth=linewidth,
**kwargs)
r_array = np.zeros_like(t_array) + value
h_plot, = self.ax.plot(t_array,
r_array,
color=color,
linestyle=linestyle,
linewidth=linewidth,
**kwargs)

def add_grid(self, *args, **kwargs):
"""Add a grid.
Expand Down
Loading

0 comments on commit 7a76fb8

Please sign in to comment.