Created
March 30, 2016 00:04
-
-
Save mos3abof/9f4df60fe7fa4ef55d19040849064188 to your computer and use it in GitHub Desktop.
Some Soundcloud Perspective XKCD Style
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
import matplotlib.pyplot as plt | |
with plt.xkcd(): | |
fig = plt.figure() | |
ax = fig.add_axes((0.1, 0.2, 0.8, 0.7)) | |
ax.bar([-0.125, 1.0 - (5 * 0.125), 1.0 - 0.125], [10, 50, 250], 0.25) | |
ax.spines['right'].set_color('none') | |
ax.spines['top'].set_color('none') | |
ax.xaxis.set_ticks_position('bottom') | |
ax.set_xticks([0, 0.5, 1]) | |
ax.set_xlim([-0.5, 1.5]) | |
ax.set_ylim([0, 200]) | |
ax.set_xticklabels(['REPOSTED', 'LIKED', 'PLAYED']) | |
plt.yticks([]) | |
plt.title("SOME SOUNDCLOUD PERSPECTIVE XKCD STYLE") | |
fig.text( | |
0.5, 0.05, | |
'The number of soundcloud tracks that I have\nreposted vs liked vs played', | |
ha='center') | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment