Skip to content

Instantly share code, notes, and snippets.

@edmundmiller
Created February 1, 2017 00:40
Show Gist options
  • Save edmundmiller/882b34fa2a0e5245d8cabf6c070dee0d to your computer and use it in GitHub Desktop.
Save edmundmiller/882b34fa2a0e5245d8cabf6c070dee0d to your computer and use it in GitHub Desktop.
Practice with pyplot
<component name="ProjectDictionaryState">
<dictionary name="eman.2015" />
</component>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.5.3 (C:\Users\eman.2015\AppData\Local\Programs\Python\Python35\python.exe)" project-jdk-type="Python SDK" />
</project>
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/Python.iml" filepath="$PROJECT_DIR$/.idea/Python.iml" />
</modules>
</component>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<module type="PYTHON_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/dataSci" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
<component name="TestRunnerService">
<option name="PROJECT_TEST_RUNNER" value="Unittests" />
</component>
</module>
import matplotlib.pyplot as plt
import csv
days = [1, 2, 3, 4, 5]
sleeping = [7, 8, 6, 11, 7]
eating = [2, 3, 4, 3, 2]
working = [7, 8, 7, 2, 2]
playing = [8, 5, 7, 8, 13]
plt.stackplot(days, sleeping, eating, working, playing, colors=['m', 'c', 'r', 'k'])
plt.xlabel('x')
plt.ylabel('y')
plt.title('Interesting graph \n Check it out')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment