<div dir="ltr"><div><a href="https://www.ncl.ucar.edu/Document/Functions/Built-in/sprintf.shtml"><b>sprintf</b></a></div><div><br></div><div>Hopefully, that will work for you.<br></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, Apr 8, 2021 at 4:11 AM Buzan, Jonathan via ncl-talk <<a href="mailto:ncl-talk@mailman.ucar.edu">ncl-talk@mailman.ucar.edu</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi NCL-Talk,<br>
<br>
I am attempting to print a variable on a plot, and I am using the decimalPlaces function. However, the results are not applied the same way. Am I doing something wrong? <br>
<br>
Cheers,<br>
-Jonathan<br>
<br>
<br>
Code snippet:<br>
EU_R = decimalPlaces(EU_17(0),2,False)<br>
EU_R2 = decimalPlaces(EU_17(1),2,False)<br>
EU_B = decimalPlaces(EU_17(2),2,False)<br>
EU_M = decimalPlaces(EU_17(3),2,False)<br>
print(EU_R)<br>
print(EU_R2)<br>
print(EU_B)<br>
print(EU_M)<br>
print(EU_17(3))<br>
<br>
Results:<br>
Variable: EU_R<br>
Type: double<br>
Total Size: 8 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 9.969209968386869e+36<br>
(0) 0.8100000000000001<br>
<br>
<br>
Variable: EU_R2<br>
Type: double<br>
Total Size: 8 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 9.969209968386869e+36<br>
(0) 0.67<br>
<br>
<br>
Variable: EU_B<br>
Type: double<br>
Total Size: 8 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 9.969209968386869e+36<br>
(0) 111.46<br>
<br>
<br>
Variable: EU_M<br>
Type: double<br>
Total Size: 8 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 9.969209968386869e+36<br>
(0) 0.6899999999999999<br>
<br>
<br>
Variable: EU_17 (subsection)<br>
Type: double<br>
Total Size: 8 bytes<br>
1 values<br>
Number of Dimensions: 1<br>
Dimensions and sizes: [1]<br>
Coordinates: <br>
Number Of Attributes: 1<br>
_FillValue : 9.969209968386869e+36<br>
(0) 0.6903772429834589<br>
<br>
_______________________________________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@mailman.ucar.edu" target="_blank">ncl-talk@mailman.ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://mailman.ucar.edu/mailman/listinfo/ncl-talk" rel="noreferrer" target="_blank">https://mailman.ucar.edu/mailman/listinfo/ncl-talk</a><br>
</blockquote></div>