Skip to content

Commit 436a3d3

Browse files
authored
Merge pull request #97 from danieljprice/time-legend
Datetime strings in the time legend
2 parents 8c853fb + 8c6b3df commit 436a3d3

File tree

6 files changed

+321
-28
lines changed

6 files changed

+321
-28
lines changed

docs/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
author = 'Daniel Price'
2323

2424
# The full version, including alpha/beta/rc tags
25-
release = 'v3.11.3'
25+
release = 'v3.11.4'
2626

2727
# -- General configuration ---------------------------------------------------
2828

docs/version_history.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,13 @@
11

2+
**3.11.4: (25/06/25)**
3+
4+
- can print time as date and time with offset e.g. 2025-06-25 12:35 in legend
5+
- plot minimum size point when using scalable markers so sink particles are always visible (thanks to Yann Bernard)
6+
- issue reading .comp files fixed
7+
- fixed issue reading column labels if fewer labels than columns
8+
- experimental --get_h flag to override smoothing lengths
9+
- fix bug with truncated name in copyright string (thanks to George Blaylock-Squibbs)
10+
211
**3.11.3: (23/04/25)**
312

413
- bug fix with automatic choice of columns with -360, also render density automatically in 360 mode

src/legends.f90

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ subroutine legend(legendtext,t,nvar,allvars,tags,unitslabel,hpos,vpos,fjust,useb
102102

103103
if (index(label,'%ut') > 0) then
104104
call string_replace(label,'%ut',trim(unitslabel))
105-
else
105+
elseif (index(legendtext,'%') == 0) then
106106
label = trim(label)//trim(unitslabel)
107107
endif
108108

src/options_page.f90

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -599,14 +599,16 @@ subroutine submenu_legend(ichoose)
599599
call prompt('Plot time legend? ',iPlotLegend)
600600
print "(a)",'Time legend is '//print_logical(iPlotLegend)
601601
if (iPlotLegend) then
602-
print "(7(/,a),/)", &
602+
print "(9(/,a),/)", &
603603
' Example format strings: ', &
604-
' t = : this is the default format "t = 0.1 years"', &
605-
' t = %t.5 : with time to 5 significant figures', &
606-
' Time: %t dog-%ut : gives "Time: 0.1 dog-years"', &
607-
' %(t + 2013) : prints time offset by 2013', &
608-
' %(t + 2013).5 : as above, to 5 sig. figs.', &
609-
' %(t*100) : multiplied by 100'
604+
' t = : this is the default format "t = 0.1 years"', &
605+
' t = %t.5 : with time to 5 significant figures', &
606+
' Time: %t dog-%ut : gives "Time: 0.1 dog-years"', &
607+
' %(t + 2013) : prints time offset by 2013', &
608+
' %(t + 2013).5 : as above, to 5 sig. figs.', &
609+
' %(t*100) : multiplied by 100', &
610+
' %(t + 2013-04-10):dt : prints time as date offset by 2013-04-10', &
611+
' %(t + 2013-04-10 12:00):dt : prints time as date and time offset by 2013-04-10 12:00'
610612
nhdr = count_non_blank(headertags)
611613
print "(a)",' You can print any header variables using %(var):'
612614
print "(43(2x,6(a),/))",headertags(1:nhdr)

0 commit comments

Comments
 (0)