-
-
Save vaer-k/7859fec52db7faa08026dd699c76e7d5 to your computer and use it in GitHub Desktop.
Example showing how to use matplotlib from a Zeppelin notebook
This file contains hidden or 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
| %pyspark | |
| import matplotlib.pyplot as plt | |
| z.configure_mpl(width=400, height=300, fmt='svg') | |
| # Example data | |
| people = ('Goku', 'Vegeta', 'Gohan', 'Raditz', 'Trunks') | |
| y_pos = np.arange(len(people)) | |
| performance = 3 + 10 * np.random.rand(len(people)) | |
| error = np.random.rand(len(people)) | |
| plt.barh(y_pos, performance, xerr=error, align='center', alpha=0.4) | |
| plt.yticks(y_pos, people) | |
| plt.xlabel('Times') | |
| plt.title('How many times have they gone super saiyan today?') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment