update taylor_diagram function

This commit is contained in:
wyq 2020-10-23 19:20:04 +08:00
parent 6ac17ddc11
commit ddefc31de3
3 changed files with 12 additions and 10 deletions

View File

@ -1,34 +1,36 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<MeteoInfo File="milconfig.xml" Type="configurefile">
<Path OpenPath="D:\Working\MIScript\Jython\mis\io\grib">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\scatter"/>
<Path OpenPath="D:\Working\MIScript\Jython\mis\plot_types\taylor">
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\traj"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\contour"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\plot"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\burf"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml\classification"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\toolbox\miml\cluster"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io\grib"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\io"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types"/>
<RecentFolder Folder="D:\Working\MIScript\Jython\mis\plot_types\taylor"/>
</Path>
<File>
<OpenedFiles>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\heart.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sombrero.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\cluster\dbscan_1.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\io\grib\record_read_data-2.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\taylor\taylor_2.py"/>
<OpenedFile File="D:\Working\MIScript\Jython\mis\plot_types\taylor\taylor_3.py"/>
</OpenedFiles>
<RecentFiles>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\heart.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\3d\jogl\surf_sombrero.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\toolbox\miml\cluster\dbscan_1.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\io\grib\record_read_data-2.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\taylor\taylor_2.py"/>
<RecentFile File="D:\Working\MIScript\Jython\mis\plot_types\taylor\taylor_3.py"/>
</RecentFiles>
</File>
<Font>

View File

@ -3020,7 +3020,7 @@ class Axes(object):
xticks = self.get_xticks()
for i in xticks:
self.plot(xunit * i, yunit * i, color='gray', linestyle='--')
self.plot(xunit * std_max, yunit * std_max)
self.plot(xunit * std_max, yunit * std_max, color='k')
#plot correlation lines
values = np.arange(0., 1., 0.1)
@ -3032,7 +3032,7 @@ class Axes(object):
if 0 < t < 1:
if t == 0.6 or t == 0.9:
self.plot([0,x], [0,y], color='gray', linestyle=':')
self.plot([x*0.98,x], [y*0.98,y])
self.plot([x*0.98,x], [y*0.98,y], color='k')
x = x * 1.02
y = y * 1.02
self.text(x, y, str(t), rotation=np.degrees(theta), yalign='center')
@ -3046,7 +3046,7 @@ class Axes(object):
theta = np.acos(t)
x = np.cos(theta) * std_max
y = np.sin(theta) * std_max
self.plot([x*0.99,x], [y*0.99,y])
self.plot([x*0.99,x], [y*0.99,y], color='k')
#plot data
stddev = np.atleast_2d(stddev)