lots a small stuff
This commit is contained in:
@@ -7,7 +7,7 @@ from matplotlib.ticker import MultipleLocator,FuncFormatter,NullFormatter
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import numpy as np
|
||||
from rowers.rows import format_pace_tick, format_pace, format_time, format_time_tick
|
||||
from rowers.rows import format_pace_tick, format_pace, format_time, format_time_tick
|
||||
|
||||
|
||||
# Formatting the distance tick marks
|
||||
@@ -36,7 +36,7 @@ def y_axis_range(ydata,miny=0,padding=.1,ultimate=[-1e9,1e9]):
|
||||
|
||||
|
||||
|
||||
if (yrange == 0):
|
||||
if (yrange == 0): # pragma: no cover
|
||||
if ymin == 0:
|
||||
yrangemin = -padding
|
||||
else:
|
||||
@@ -49,14 +49,14 @@ def y_axis_range(ydata,miny=0,padding=.1,ultimate=[-1e9,1e9]):
|
||||
yrangemin = ymin-padding*yrange
|
||||
yrangemax = ymax+padding*yrange
|
||||
|
||||
if (yrangemin < ultimate[0]):
|
||||
if (yrangemin < ultimate[0]): # pragma: no cover
|
||||
yrangemin = ultimate[0]
|
||||
|
||||
if (yrangemax > ultimate[1]):
|
||||
yrangemax = ultimate[1]
|
||||
|
||||
|
||||
|
||||
|
||||
return [yrangemin,yrangemax]
|
||||
|
||||
# Make a plot (this one is only used for testing)
|
||||
@@ -85,7 +85,7 @@ def mkplot(row,title):
|
||||
majorFormatter = FuncFormatter(format_pace_tick)
|
||||
majorLocator = (5)
|
||||
timeTickFormatter = NullFormatter()
|
||||
|
||||
|
||||
ax1.yaxis.set_major_formatter(majorFormatter)
|
||||
|
||||
for tl in ax1.get_yticklabels():
|
||||
@@ -100,8 +100,7 @@ def mkplot(row,title):
|
||||
ax2.patch.set_alpha(0.0)
|
||||
for tl in ax2.get_yticklabels():
|
||||
tl.set_color('r')
|
||||
|
||||
|
||||
plt.subplots_adjust(hspace=0)
|
||||
|
||||
return fig
|
||||
|
||||
|
||||
Reference in New Issue
Block a user