Changes

Jump to navigation Jump to search
479 bytes added ,  16:38, 12 February 2022
m
Line 36: Line 36:  
===Bar===
 
===Bar===
   −
==== Vertical ====
+
====Vertical====
 
<syntaxhighlight lang="python3">
 
<syntaxhighlight lang="python3">
 
import numpy as np
 
import numpy as np
Line 69: Line 69:  
</syntaxhighlight>
 
</syntaxhighlight>
   −
==== Horizontal ====
+
====Horizontal====
 
<syntaxhighlight lang="python3">
 
<syntaxhighlight lang="python3">
   Line 107: Line 107:  
plt.tight_layout()
 
plt.tight_layout()
    +
plt.show()
 +
</syntaxhighlight>
 +
 +
=== Pie ===
 +
<syntaxhighlight lang="python3">
 +
from matplotlib import pyplot as plt
 +
 +
plt.style.use("fivethirtyeight")
 +
 +
slices = [59219, 55466, 47544, 36443, 35917]
 +
labels = ['JavaScript', 'HTML/CSS', 'SQL', 'Python', 'Java']
 +
explode = [0, 0, 0, 0.1, 0]
 +
 +
plt.pie(slices, labels=labels, explode=explode, shadow=True,
 +
        startangle=90, autopct='%1.1f%%',
 +
        wedgeprops={'edgecolor': 'black'})
 +
 +
plt.title("My Awesome Pie Chart")
 +
plt.tight_layout()
 
plt.show()
 
plt.show()
 
</syntaxhighlight>
 
</syntaxhighlight>

Navigation menu