Skip to content

Commit

Permalink
Update get_target_diagram_options.py
Browse files Browse the repository at this point in the history
Added tweaks/choice of colormap, vmin, vmax to colourmap option
  • Loading branch information
vinodkatmos authored and Peter Rochford committed Jan 9, 2023
1 parent 055f3b5 commit 983d66d
Show file tree
Hide file tree
Showing 6 changed files with 262 additions and 154 deletions.
26 changes: 17 additions & 9 deletions Examples/target8.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,6 @@ def __init__(self, target_stats1, target_stats2, taylor_stats1, taylor_stats2):
rcParams.update({'font.size': 12}) # font size of axes text

# Close any previously open graphics windows
# ToDo: fails to work within Eclipse
plt.close('all')

# Read target statistics for ERA Interim (stats1) and TRMM (stats2)
Expand All @@ -111,20 +110,29 @@ def __init__(self, target_stats1, target_stats2, taylor_stats1, taylor_stats2):
'''
Produce the target diagram for the first dataset
'''
sm.target_diagram(stats.target_stats1['bias'],
stats.target_stats1['crmsd'],
stats.target_stats1['rmsd'], markercolor ='r', alpha = 0.0,
ticks=np.arange(-2.0,2.5,0.5),
circles = [0.5, 1.0, 2.0],
circleLineSpec = 'k--', circleLineWidth = 1.0)
if True:
sm.target_diagram(stats.target_stats1['bias'],
stats.target_stats1['crmsd'],
stats.target_stats1['rmsd'], markercolor ='r', alpha = 0.0,
ticks=np.arange(-2.0,2.5,0.5),
circles = [0.5, 1.0, 2.0],
circleLineSpec = 'k--', circleLineWidth = 1.0)
else:
sm.target_diagram(stats.target_stats1['bias'],
stats.target_stats1['crmsd'],
stats.target_stats1['rmsd'],
ticks=np.arange(-2.0,2.5,0.5),
circles = [0.5, 1.0, 2.0],
target_options_file = 'target_option_config.csv')

'''
Overlay the second dataset
'''
sm.target_diagram(stats.target_stats2['bias'],
stats.target_stats2['crmsd'],
stats.target_stats2['rmsd'], markercolor ='b', alpha = 0.0,
overlay = 'on', markerLabel = label)
stats.target_stats2['rmsd'], markercolor ='b',
overlay = 'on', markerLabel = label,
target_options_file = 'target_option_config.csv')

# Write plot to file if arguments say so
None if args.no_save else plt.savefig('target8.png')
Expand Down
115 changes: 0 additions & 115 deletions setup.py

This file was deleted.

2 changes: 1 addition & 1 deletion skill_metrics/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__='1.2.1'
__version__='1.2.2'

from .add_legend import add_legend
from .bias import bias
Expand Down
Loading

0 comments on commit 983d66d

Please sign in to comment.