Created
September 15, 2021 02:21
-
-
Save davisvictorns/d8160d60835078c035fc424f60a673b2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# degree sequence | |
count_sequence = sorted([data['count'] for node, data in list(G.nodes.data())], reverse=True)[1:] | |
fig, ax = plt.subplots(1,2,figsize=(8,4)) | |
# all_data has information about count_sequence and the width of each bin | |
ax[0].hist(count_sequence) | |
ax[1].hist(count_sequence,bins=[x for x in range(80)]) | |
ax[0].set_title("count Histogram") | |
ax[0].set_ylabel("Count") | |
ax[0].set_xlabel("n tweets") | |
ax[0].set_ylim(0, max(count_sequence)) | |
ax[1].set_title("count Histogram - Zoom") | |
ax[1].set_ylabel("Count") | |
ax[1].set_xlabel("n tweets") | |
ax[1].set_xlim(0, 80) | |
ax[1].set_ylim(0,150) | |
plt.tight_layout() | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment