Skip to content

Commit ecba62c

Browse files
Refactor Tephi to work with Subplots (#170)
* began fixing imports * refactored experimental subplots code * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * corrected imports * corrected imports * added shapely to docs env * readded DATA_DIR to __init__ * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci * imported os * reverted weird change * drastic measures * numpy to mp * fuctioning tests, albeit image tests need work * removing legacy * subplot tests and refactorings * fixed the broken imtests, and added some todos * readded in default sizing * removed isopleths from barbs_from_file * added test images * started fixing the doctests * loadtext docstring numpy style * locator numpy2 compatible * further doctests * phash * added a unpleasant workaround * added properties for each isopleth * DRAFT: rewritten customise.rst * DRAFT: corrected rst * DRAFT: corrected rst * DRAFT: corrected rst * barb fix * fixed mpl custom artists * fixed mpl custom artists * made progress on customisation docs * fixed mixing ratios * fixed pre-commit formatting * removed print, added preamble * fixed preamble indents --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
1 parent f69cd49 commit ecba62c

File tree

15 files changed

+1407
-1558
lines changed

15 files changed

+1407
-1558
lines changed

docs/source/barbs.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ A profile must be first plotted before the barbs are associated with that profil
3434
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
3535
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
3636
dews = zip(dew_data.pressure, dew_data.dewpoint)
37-
tpg = tephi.Tephigram()
37+
tpg = tephi.TephiAxes()
3838
profile = tpg.plot(dews)
3939
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
4040
(10, 90, 750), (15, 120, 700), (20, 150, 650),
@@ -64,7 +64,7 @@ Note that, the barbs default to the same colour as their associated profile.
6464
dews = zip(dew_data.pressure, dew_data.dewpoint)
6565
temps = zip(temp_data.pressure, temp_data.temperature)
6666

67-
tpg = tephi.Tephigram()
67+
tpg = tephi.TephiAxes()
6868
dprofile = tpg.plot(dews)
6969
dbarbs = [(0, 0, 900), (15, 120, 600), (35, 240, 300)]
7070
dprofile.barbs(dbarbs)
@@ -89,7 +89,7 @@ Barbs may also be plotted using wind speed and wind direction data (associated w
8989
barb_data = tephi.loadtxt(winds, column_titles=column_titles)
9090
dews = zip(barb_data.pressure, barb_data.dewpoint)
9191
barbs = zip(barb_data.wind_speed, barb_data.wind_direction, barb_data.pressure)
92-
tpg = tephi.Tephigram()
92+
tpg = tephi.TephiAxes()
9393
profile = tpg.plot(dews)
9494
profile.barbs(barbs)
9595
plt.show()
@@ -113,7 +113,7 @@ This transparency allows full control when plotting barbs on the tephigram.
113113
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
114114
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
115115
dews = zip(dew_data.pressure, dew_data.dewpoint)
116-
tpg = tephi.Tephigram()
116+
tpg = tephi.TephiAxes()
117117
profile = tpg.plot(dews)
118118
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
119119
(10, 90, 750), (15, 120, 700), (20, 150, 650),
@@ -141,7 +141,7 @@ By default, the barbs are plotted on the right hand side of the tephigram. The p
141141
dew_point = os.path.join(tephi.DATA_DIR, 'dews.txt')
142142
dew_data = tephi.loadtxt(dew_point, column_titles=('pressure', 'dewpoint'))
143143
dews = zip(dew_data.pressure, dew_data.dewpoint)
144-
tpg = tephi.Tephigram()
144+
tpg = tephi.TephiAxes()
145145
profile = tpg.plot(dews)
146146
barbs = [(0, 0, 900), (1, 30, 850), (5, 60, 800),
147147
(10, 90, 750), (15, 120, 700), (20, 150, 650),

docs/source/conf.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@
4242
"sphinx.ext.intersphinx",
4343
"matplotlib.sphinxext.mathmpl",
4444
"matplotlib.sphinxext.plot_directive",
45+
"matplotlib.sphinxext.roles",
4546
"sphinx_copybutton",
4647
]
4748

0 commit comments

Comments
 (0)