passes checks in python3
This commit is contained in:
@@ -2,14 +2,14 @@ from matplotlib.ticker import MultipleLocator,FuncFormatter,NullFormatter
|
||||
import matplotlib.pyplot as plt
|
||||
|
||||
import numpy as np
|
||||
from 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
|
||||
#def format_dist_tick(x,pos=None):
|
||||
# km = x/1000.
|
||||
# template='%6.3f'
|
||||
# return template % (km)
|
||||
# km = x/1000.
|
||||
# template='%6.3f'
|
||||
# return template % (km)
|
||||
|
||||
|
||||
# Utility to select reasonable y axis range
|
||||
@@ -32,23 +32,23 @@ def y_axis_range(ydata,miny=0,padding=.1,ultimate=[-1e9,1e9]):
|
||||
|
||||
|
||||
if (yrange == 0):
|
||||
if ymin == 0:
|
||||
yrangemin = -padding
|
||||
else:
|
||||
yrangemin = ymin-ymin*padding
|
||||
if ymax == 0:
|
||||
yrangemax = padding
|
||||
else:
|
||||
yrangemax = ymax+ymax*padding
|
||||
if ymin == 0:
|
||||
yrangemin = -padding
|
||||
else:
|
||||
yrangemin = ymin-ymin*padding
|
||||
if ymax == 0:
|
||||
yrangemax = padding
|
||||
else:
|
||||
yrangemax = ymax+ymax*padding
|
||||
else:
|
||||
yrangemin = ymin-padding*yrange
|
||||
yrangemax = ymax+padding*yrange
|
||||
yrangemin = ymin-padding*yrange
|
||||
yrangemax = ymax+padding*yrange
|
||||
|
||||
if (yrangemin < ultimate[0]):
|
||||
yrangemin = ultimate[0]
|
||||
yrangemin = ultimate[0]
|
||||
|
||||
if (yrangemax > ultimate[1]):
|
||||
yrangemax = ultimate[1]
|
||||
yrangemax = ultimate[1]
|
||||
|
||||
|
||||
|
||||
@@ -70,7 +70,7 @@ def mkplot(row,title):
|
||||
ax1.set_ylabel('(sec/500)')
|
||||
|
||||
yrange = y_axis_range(df.loc[:,' Stroke500mPace (sec/500m)'],
|
||||
ultimate = [85,190])
|
||||
ultimate = [85,190])
|
||||
plt.axis([0,end_time,yrange[1],yrange[0]])
|
||||
|
||||
ax1.set_xticks(range(1000,end_time,1000))
|
||||
@@ -80,11 +80,11 @@ 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():
|
||||
tl.set_color('b')
|
||||
tl.set_color('b')
|
||||
|
||||
ax2 = ax1.twinx()
|
||||
ax2.plot(t,hr,'r-')
|
||||
@@ -94,7 +94,7 @@ def mkplot(row,title):
|
||||
ax2.xaxis.set_major_formatter(majorTimeFormatter)
|
||||
ax2.patch.set_alpha(0.0)
|
||||
for tl in ax2.get_yticklabels():
|
||||
tl.set_color('r')
|
||||
tl.set_color('r')
|
||||
|
||||
plt.subplots_adjust(hspace=0)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user