Skip to content
This repository has been archived by the owner on May 17, 2021. It is now read-only.

Commit

Permalink
Merge pull request #154 from ehsteve/plot_update
Browse files Browse the repository at this point in the history
Update to plots
  • Loading branch information
ehsteve authored Aug 23, 2019
2 parents 270e840 + 1e5b9de commit c8faf2d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 6 deletions.
Binary file modified figures/dev_meta.pdf
Binary file not shown.
Binary file modified figures/fig_diff_rot_1600.pdf
Binary file not shown.
24 changes: 18 additions & 6 deletions figures/repo_statistic_plots.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,15 @@
import matplotlib.pyplot as plt
import numpy as np
import pandas as pd

# works for
# python 3.6
# pandas 0.25
# matplotlib 3.1.1

from pandas.plotting import register_matplotlib_converters
register_matplotlib_converters()

import pytz
from git import Repo
import shutil
Expand All @@ -14,20 +23,20 @@

datafile_url = os.path.join(sunpy_paper.data_dir, "loc_vs_time.csv")
data = pd.read_csv(datafile_url, parse_dates=True, index_col=0, comment="#")

x = data.index
y1 = data["code"].values / 10000.0
y2 = data["comment"].values / 10000.0

x = pd.to_datetime(data.index, utc=True)
y1 = data["code"].values / 1000.0
y2 = data["comment"].values / 1000.0
axes[0].plot(x, y1, label="code", color="black", linestyle="-")
axes[0].plot(x, y2, label="comment", color="black", linestyle="--")

axes[0].set_ylabel("Lines (thousands)")
axes[0].set_xlabel("Year")
axes[0].set_ylim(0, 3.5)
axes[0].set_ylim(0, 35)
axes[0].legend(loc=2, frameon=False)
axes[0].minorticks_off()

axes[0].grid(axis='y')

axes[0].xaxis.set_tick_params(labelrotation=45)
# add vertical lines for the releases
sunpy_paper.add_releases_vs_time(axes[0])
Expand Down Expand Up @@ -84,6 +93,9 @@
axes[1].minorticks_off()
axes[1].xaxis.set_tick_params(labelrotation=45)

axes[1].grid(axis='y')


sunpy_paper.add_releases_vs_time(axes[1])

# now create a plot of the number of commits versus the number of committers
Expand Down

0 comments on commit c8faf2d

Please sign in to comment.