percentage view and suppressing scientific notation
This commit is contained in:
@@ -91,7 +91,7 @@ heat_frame = pd.DataFrame(data=0, index=heat.index, columns = hours_in_day)
|
|||||||
heat=(heat+heat_frame).fillna(0)
|
heat=(heat+heat_frame).fillna(0)
|
||||||
|
|
||||||
#Generatie heatmap plot
|
#Generatie heatmap plot
|
||||||
plot = sns.heatmap(heat, norm=LogNorm(), annot=True, annot_kws={"fontsize":7}, cmap = pal , square = False, cbar=False, linewidths = 0.5, linecolor = "Grey", ax=axs[1], yticklabels = False)
|
plot = sns.heatmap(heat, norm=LogNorm(), annot=True, fmt="g", annot_kws={"fontsize":7}, cmap = pal , square = False, cbar=False, linewidths = 0.5, linecolor = "Grey", ax=axs[1], yticklabels = False)
|
||||||
|
|
||||||
# Set heatmap border
|
# Set heatmap border
|
||||||
for _, spine in plot.spines.items():
|
for _, spine in plot.spines.items():
|
||||||
@@ -102,7 +102,7 @@ plot.set(xlabel="Hour of Day")
|
|||||||
#Set combined plot layout and titles
|
#Set combined plot layout and titles
|
||||||
plt.tight_layout()
|
plt.tight_layout()
|
||||||
f.subplots_adjust(top=0.9)
|
f.subplots_adjust(top=0.9)
|
||||||
plt.suptitle("Last Updated: "+ str(now.strftime("%B, %d at %I:%M%P")))
|
plt.suptitle("Last Updated: "+ str(now.strftime("%B, %d at %T")))
|
||||||
|
|
||||||
#Save combined plot
|
#Save combined plot
|
||||||
savename='/home/pi/BirdSongs/Extracted/Charts/Combo-'+str(now.strftime("%d-%m-%Y"))+'.png'
|
savename='/home/pi/BirdSongs/Extracted/Charts/Combo-'+str(now.strftime("%d-%m-%Y"))+'.png'
|
||||||
|
|||||||
+4
-2
@@ -98,6 +98,7 @@ $mysqli->close();
|
|||||||
<?php // LOOP TILL END OF DATA
|
<?php // LOOP TILL END OF DATA
|
||||||
while($rows=$mosttable ->fetch_assoc())
|
while($rows=$mosttable ->fetch_assoc())
|
||||||
{
|
{
|
||||||
|
$Confidence = sprintf("%.1f%%", $rows['Confidence'] * 100);
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<!--FETCHING DATA FROM EACH
|
<!--FETCHING DATA FROM EACH
|
||||||
@@ -105,7 +106,7 @@ while($rows=$mosttable ->fetch_assoc())
|
|||||||
<td><?php echo $rows['Time'];?></td>
|
<td><?php echo $rows['Time'];?></td>
|
||||||
<td><?php echo $rows['Sci_Name'];?></td>
|
<td><?php echo $rows['Sci_Name'];?></td>
|
||||||
<td><?php echo $rows['Com_Name'];?></td>
|
<td><?php echo $rows['Com_Name'];?></td>
|
||||||
<td><?php echo $rows['Confidence'];?></td>
|
<td><?php echo $Confidence;?></td>
|
||||||
<td><?php echo $rows['Lat'];?></td>
|
<td><?php echo $rows['Lat'];?></td>
|
||||||
<td><?php echo $rows['Lon'];?></td>
|
<td><?php echo $rows['Lon'];?></td>
|
||||||
<td><?php echo $rows['Cutoff'];?></td>
|
<td><?php echo $rows['Cutoff'];?></td>
|
||||||
@@ -130,12 +131,13 @@ while($rows=$mosttable ->fetch_assoc())
|
|||||||
<?php // LOOP TILL END OF DATA
|
<?php // LOOP TILL END OF DATA
|
||||||
while($rows=$specieslist ->fetch_assoc())
|
while($rows=$specieslist ->fetch_assoc())
|
||||||
{
|
{
|
||||||
|
$MAX = sprintf("%.1f%%", $rows['MAX(Confidence)'] * 100)
|
||||||
?>
|
?>
|
||||||
<tr>
|
<tr>
|
||||||
<td><?php echo $rows['Com_Name'];?></td>
|
<td><?php echo $rows['Com_Name'];?></td>
|
||||||
<td><?php echo $rows['Date'];?></td>
|
<td><?php echo $rows['Date'];?></td>
|
||||||
<td><?php echo $rows['Time'];?></td>
|
<td><?php echo $rows['Time'];?></td>
|
||||||
<td><?php echo $rows['MAX(Confidence)'];?></td>
|
<td><?php echo $MAX;?></td>
|
||||||
|
|
||||||
</tr>
|
</tr>
|
||||||
<?php
|
<?php
|
||||||
|
|||||||
Reference in New Issue
Block a user