Esempio n. 1
0
def plot_time(unixtime_list):
    import draw_func2 as df2
    unixtime_list = np.array(unixtime_list)
    fixed_time = unixtime_list[unixtime_list > 0]
    df2.plot(sorted(unixtime_list))
    ax = df2.gca()
    ax.set_ylim(fixed_time.min(), fixed_time.max())
Esempio n. 2
0
 def _distplot(dists, color, label, distkey, plot_type=plot_type):
     data = sorted(dists)
     ax = df2.gca()
     min_ = distkey2_min[distkey]
     max_ = distkey2_max[distkey]
     if plot_type == 'plot':
         df2.plot(data, color=color, label=label)
         #xticks = np.linspace(np.min(data), np.max(data), 3)
         #yticks = np.linspace(0, len(data), 5)
         #ax.set_xticks(xticks)
         #ax.set_yticks(yticks)
         ax.set_ylim(min_, max_)
         ax.set_xlim(0, len(dists))
         ax.set_ylabel('distance')
         ax.set_xlabel('matches indexes (sorted by distance)')
         df2.legend(loc='lower right')
     if plot_type == 'pdf':
         df2.plot_pdf(data, color=color, label=label)
         ax.set_ylabel('pr')
         ax.set_xlabel('distance')
         ax.set_xlim(min_, max_)
         df2.legend(loc='upper right')
     df2.dark_background(ax)
     df2.small_xticks(ax)
     df2.small_yticks(ax)