Browse files

ticket:21 modifications to figures

  • Loading branch information...
1 parent 776877c commit 350a875b47e12a01734c679b61466e9de53b74be @dudarev committed Jul 20, 2012
View
BIN cghub_api/docs/source/imgs/four_pos_queries_with_cache_plot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN cghub_api/docs/source/imgs/four_pos_queries_without_cache_plot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN cghub_api/docs/source/imgs/three_pos_queries_with_cache_plot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN cghub_api/docs/source/imgs/three_pos_queries_without_cache_plot.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
15 cghub_api/utils/profile/plot.py
@@ -7,13 +7,18 @@ def plot_profiler_stats(ifilename, ofilename):
with open(ifilename, 'r') as ifile:
statistics = csv.reader(ifile)
statistics.next()
- figure = plt.figure()
- ax = figure.add_subplot(111)
+ count_ar = []
+ time_ar = []
for row in statistics:
query, count, time = row
- ax.plot(int(count), float(time), 'o')
- ax.plot([1, 1], label=query)
- plt.savefig(ofilename, dpi=120)
+ count_ar.append(int(count))
+ time_ar.append(float(time))
+ figure = plt.figure()
+ ax = figure.add_subplot(111)
+ ax.plot(count_ar, time_ar, 'o')
+ plt.ylabel('Time [s]', fontsize=20)
+ plt.xlabel('Results count', fontsize=20)
+ plt.savefig(ofilename, dpi=120)
if __name__ == '__main__':
if len(sys.argv) > 2:

0 comments on commit 350a875

Please sign in to comment.