Compare commits
5 Commits
d88dbb2572
...
8e6adb726b
Author | SHA1 | Date |
---|---|---|
Julien Palard | 8e6adb726b | |
Julien Palard | 2870ae98c1 | |
Julien Palard | 5f75407e98 | |
Julien Palard | 7c64c595eb | |
Julien Palard | 73d8ce5ad8 |
18
cy.py
18
cy.py
|
@ -1,18 +0,0 @@
|
||||||
from cycler import cycler
|
|
||||||
import numpy as np
|
|
||||||
import matplotlib.pyplot as plt
|
|
||||||
|
|
||||||
x = np.linspace(0, 2 * np.pi, 50)
|
|
||||||
offsets = np.linspace(0, 2 * np.pi, 4, endpoint=False)
|
|
||||||
yy = np.transpose([np.sin(x + phi) for phi in offsets])
|
|
||||||
|
|
||||||
|
|
||||||
plt.rc("axes", prop_cycle=cycler(linestyle=["-", "--", ":", "-."]))
|
|
||||||
|
|
||||||
# fig, (ax0, ax1) = plt.subplots(nrows=2)
|
|
||||||
plt.plot(yy)
|
|
||||||
# ax0.set_title("Set default color cycle to rgby")
|
|
||||||
|
|
||||||
# Add a bit more space between the two plots.
|
|
||||||
# fig.subplots_adjust(hspace=0.3)
|
|
||||||
plt.show()
|
|
Binary file not shown.
Before Width: | Height: | Size: 70 KiB After Width: | Height: | Size: 72 KiB |
Binary file not shown.
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 61 KiB |
|
@ -1,9 +1,9 @@
|
||||||
"""Module to fetch and graph adoption of Python releases.
|
"""Module to fetch and graph adoption of Python releases.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
import argparse
|
||||||
import calendar
|
import calendar
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import sys
|
|
||||||
from datetime import datetime, timedelta, date
|
from datetime import datetime, timedelta, date
|
||||||
from collections import defaultdict
|
from collections import defaultdict
|
||||||
from itertools import cycle, count
|
from itertools import cycle, count
|
||||||
|
@ -188,8 +188,19 @@ def plot_pct():
|
||||||
plt.savefig("python-versions-pct.png")
|
plt.savefig("python-versions-pct.png")
|
||||||
|
|
||||||
|
|
||||||
|
def parse_args():
|
||||||
|
parser = argparse.ArgumentParser(description=__doc__)
|
||||||
|
parser.add_argument(
|
||||||
|
"--fetch",
|
||||||
|
action="store_true",
|
||||||
|
help="Fetch more data instead of just displaying them",
|
||||||
|
)
|
||||||
|
return parser.parse_args()
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
if "--fetch" in sys.argv:
|
args = parse_args()
|
||||||
|
if args.fetch:
|
||||||
fetch_main()
|
fetch_main()
|
||||||
plot_pct()
|
plot_pct()
|
||||||
plot_main()
|
plot_main()
|
||||||
|
|
Binary file not shown.
|
@ -0,0 +1,4 @@
|
||||||
|
pandas
|
||||||
|
pypinfo
|
||||||
|
matplotlib
|
||||||
|
scipy
|
Loading…
Reference in New Issue