-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add graph template examples using pngcairo terminal
Signed-off-by: Jim Easterbrook <jim@jim-easterbrook.me.uk>
- Loading branch information
1 parent
d2b937f
commit bec24f6
Showing
9 changed files
with
464 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
__version__ = '15.12.0.dev1338' | ||
_release = '1338' | ||
_commit = 'f461de0' | ||
__version__ = '15.12.0.dev1339' | ||
_release = '1339' | ||
_commit = 'd2b937f' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<graph> | ||
<fileformat>pngcairo enhanced font "arial,10" rounded</fileformat> | ||
<size>600, 600</size> | ||
<lmargin>5</lmargin> | ||
<start>year=2014, month=1, day=1, hour=0</start> | ||
<stop>year=2014, month=12, day=31, hour=0</stop> | ||
<xformat>%b</xformat> | ||
<xlabel>%Y</xlabel> | ||
<dateformat></dateformat> | ||
<plot> | ||
<bmargin>1</bmargin> | ||
<title>Temperature (°C)</title> | ||
<yrange>-10, 55</yrange> | ||
<y2range>-10, 55</y2range> | ||
<source>monthly</source> | ||
<grid></grid> | ||
<boxwidth>boxwidth / 2</boxwidth> | ||
<subplot> | ||
<style>box</style> | ||
<colour>1</colour> | ||
<title>Mean daytime max</title> | ||
<xcalc>data['start'] + timedelta(days=20)</xcalc> | ||
<ycalc>data['temp_out_max_ave']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>+</style> | ||
<colour>8</colour> | ||
<title>Highest daytime max</title> | ||
<xcalc>data['temp_out_max_hi_t']</xcalc> | ||
<ycalc>data['temp_out_max_hi']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>box</style> | ||
<colour>3</colour> | ||
<title>Mean nighttime min</title> | ||
<xcalc>data['start'] + timedelta(days=7)</xcalc> | ||
<ycalc>data['temp_out_min_ave']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>+</style> | ||
<colour>5</colour> | ||
<title>Lowest nighttime min</title> | ||
<xcalc>data['temp_out_min_lo_t']</xcalc> | ||
<ycalc>data['temp_out_min_lo']</ycalc> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<yrange>0, 180</yrange> | ||
<y2range>0, 180</y2range> | ||
<source>monthly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>5</colour> | ||
<style>box</style> | ||
<xcalc>data['start'] + timedelta(days=14)</xcalc> | ||
<ycalc>data['rain']</ycalc> | ||
<title>Monthly rainfall (mm)</title> | ||
</subplot> | ||
</plot> | ||
</graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<graph> | ||
<fileformat>pngcairo enhanced font "arial,10" rounded</fileformat> | ||
<size>600, 600</size> | ||
<lmargin>5</lmargin> | ||
<start>year=2015, month=1, day=1, hour=0</start> | ||
<stop>year=2015, month=12, day=31, hour=0</stop> | ||
<xformat>%b</xformat> | ||
<xlabel>%Y</xlabel> | ||
<dateformat></dateformat> | ||
<plot> | ||
<bmargin>1</bmargin> | ||
<title>Temperature (°C)</title> | ||
<yrange>-10, 55</yrange> | ||
<y2range>-10, 55</y2range> | ||
<source>monthly</source> | ||
<grid></grid> | ||
<boxwidth>boxwidth / 2</boxwidth> | ||
<subplot> | ||
<style>box</style> | ||
<colour>1</colour> | ||
<title>Mean daytime max</title> | ||
<xcalc>data['start'] + timedelta(days=20)</xcalc> | ||
<ycalc>data['temp_out_max_ave']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>+</style> | ||
<colour>8</colour> | ||
<title>Highest daytime max</title> | ||
<xcalc>data['temp_out_max_hi_t']</xcalc> | ||
<ycalc>data['temp_out_max_hi']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>box</style> | ||
<colour>3</colour> | ||
<title>Mean nighttime min</title> | ||
<xcalc>data['start'] + timedelta(days=7)</xcalc> | ||
<ycalc>data['temp_out_min_ave']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>+</style> | ||
<colour>5</colour> | ||
<title>Lowest nighttime min</title> | ||
<xcalc>data['temp_out_min_lo_t']</xcalc> | ||
<ycalc>data['temp_out_min_lo']</ycalc> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<yrange>0, 180</yrange> | ||
<y2range>0, 180</y2range> | ||
<source>monthly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>5</colour> | ||
<style>box</style> | ||
<xcalc>data['start'] + timedelta(days=14)</xcalc> | ||
<ycalc>data['rain']</ycalc> | ||
<title>Monthly rainfall (mm)</title> | ||
</subplot> | ||
</plot> | ||
</graph> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<graph> | ||
<fileformat>pngcairo enhanced font "arial,10" rounded</fileformat> | ||
<size>600, 1000</size> | ||
<lmargin>7</lmargin> | ||
<rmargin>7</rmargin> | ||
<duration>hours=24</duration> | ||
<xtics>2</xtics> | ||
<xformat>%H%M</xformat> | ||
<dateformat></dateformat> | ||
<plot> | ||
<command>set style circle radius 150</command> | ||
<bmargin>1</bmargin> | ||
<yrange>-10, 35</yrange> | ||
<y2range>-10, 35</y2range> | ||
<source>raw</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "red"</colour> | ||
<title>Temperature (°C)</title> | ||
<ycalc>data['temp_out']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<colour>rgb "green"</colour> | ||
<ycalc>dew_point(data['temp_out'], data['hum_out'])</ycalc> | ||
<title>Dew point (°C)</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<bmargin>1</bmargin> | ||
<title>Wind speed (mph)</title> | ||
<yrange>0, 35</yrange> | ||
<y2range>0, 35</y2range> | ||
<source>raw</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "blue"</colour> | ||
<ycalc>wind_mph(data['wind_ave'])</ycalc> | ||
<title>average</title> | ||
</subplot> | ||
<subplot> | ||
<style>with circles lc rgb "orange"</style> | ||
<ycalc>(None,wind_mph(data['wind_gust']))[data['wind_gust']-data['wind_ave']>1.0]</ycalc> | ||
<title>gust</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<bmargin>1</bmargin> | ||
<yrange>0, 360</yrange> | ||
<ytics>45</ytics> | ||
<y2tics>('N' 0, 'E' 90, 'S' 180, 'W' 270, 'N' 360)</y2tics> | ||
<source>raw</source> | ||
<grid></grid> | ||
<subplot> | ||
<style>with circles lc rgb "blue"</style> | ||
<colour>2</colour> | ||
<ycalc>(None,winddir_degrees(data['wind_dir']))[data['wind_ave']>0.5]</ycalc> | ||
<title>Wind direction</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<title>Rainfall (mm)</title> | ||
<bmargin>1</bmargin> | ||
<yrange>0, 10</yrange> | ||
<y2range>0, 50</y2range> | ||
<ylabel>hourly</ylabel> | ||
<y2label>total</y2label> | ||
<source>hourly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "cyan"</colour> | ||
<style>box</style> | ||
<xcalc>data['idx'].replace(minute=30, second=0)</xcalc> | ||
<ycalc>data['rain']</ycalc> | ||
<title>hourly</title> | ||
</subplot> | ||
<subplot> | ||
<colour>rgb "blue"</colour> | ||
<axes>x1y2</axes> | ||
<ycalc>data['rain'] + last_ycalc</ycalc> | ||
<title>total</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<source>hourly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "black"</colour> | ||
<ycalc>data['rel_pressure']</ycalc> | ||
<title>Pressure (hPa)</title> | ||
</subplot> | ||
<yrange>960, 1060</yrange> | ||
<y2range>960, 1060</y2range> | ||
</plot> | ||
</graph> |
92 changes: 92 additions & 0 deletions
92
src/pywws/examples/graph_templates/pngcairo/28days.png.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<graph> | ||
<fileformat>pngcairo enhanced font "arial,10" rounded</fileformat> | ||
<size>600, 800</size> | ||
<duration>weeks=4</duration> | ||
<xformat>%Y/%m/%d</xformat> | ||
<dateformat></dateformat> | ||
<lmargin>7</lmargin> | ||
<rmargin>8</rmargin> | ||
<plot> | ||
<command>set style circle radius 150</command> | ||
<title>Temperature (°C)</title> | ||
<bmargin>2</bmargin> | ||
<yrange>-10, 45</yrange> | ||
<y2range>-10, 45</y2range> | ||
<source>daily</source> | ||
<grid></grid> | ||
<boxwidth>boxwidth / 2</boxwidth> | ||
<subplot> | ||
<style>box</style> | ||
<colour>rgb "red"</colour> | ||
<title>day max</title> | ||
<xcalc>data['start'] + timedelta(hours=18)</xcalc> | ||
<ycalc>data['temp_out_max']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<style>box</style> | ||
<colour>rgb "blue"</colour> | ||
<title>night min</title> | ||
<xcalc>data['start'] + timedelta(hours=6)</xcalc> | ||
<ycalc>data['temp_out_min']</ycalc> | ||
</subplot> | ||
<subplot> | ||
<colour>rgb "green"</colour> | ||
<title>average</title> | ||
<xcalc>data['start'] + timedelta(hours=12)</xcalc> | ||
<ycalc>data['temp_out_ave']</ycalc> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<title>Wind speed (mph)</title> | ||
<bmargin>1</bmargin> | ||
<yrange>0, 35</yrange> | ||
<y2range>0, 35</y2range> | ||
<source>hourly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "blue"</colour> | ||
<ycalc>wind_mph(data['wind_ave'])</ycalc> | ||
<title>average</title> | ||
</subplot> | ||
<subplot> | ||
<style>with circles lc rgb "orange"</style> | ||
<ycalc>(None,wind_mph(data['wind_gust']))[data['wind_gust']-data['wind_ave']>1.0]</ycalc> | ||
<title>gust</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<title>Rainfall (mm)</title> | ||
<bmargin>1</bmargin> | ||
<yrange>0, 40</yrange> | ||
<ylabel>daily</ylabel> | ||
<y2range>0, 200</y2range> | ||
<y2label>total</y2label> | ||
<source>daily</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "cyan"</colour> | ||
<style>box</style> | ||
<xcalc>data['start'] + timedelta(hours=14)</xcalc> | ||
<ycalc>data['rain']</ycalc> | ||
<title>daily</title> | ||
</subplot> | ||
<subplot> | ||
<colour>rgb "blue"</colour> | ||
<axes>x1y2</axes> | ||
<ycalc>data['rain'] + last_ycalc</ycalc> | ||
<title>total</title> | ||
</subplot> | ||
</plot> | ||
<plot> | ||
<source>hourly</source> | ||
<grid></grid> | ||
<subplot> | ||
<colour>rgb "black"</colour> | ||
<ycalc>data['rel_pressure']</ycalc> | ||
<title>Pressure (hPa)</title> | ||
</subplot> | ||
<yrange>960, 1060</yrange> | ||
<y2range>960, 1060</y2range> | ||
</plot> | ||
</graph> |
Oops, something went wrong.