[PATCH] D77155: [llvm-locstats] Fix labels on x-axis of comparison chart
Vedant Kumar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 1 10:08:18 PDT 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rG3a7865df626c: [llvm-locstats] Fix labels on x-axis of comparison chart (authored by vsk).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D77155/new/
https://reviews.llvm.org/D77155
Files:
llvm/utils/llvm-locstats/llvm-locstats.py
Index: llvm/utils/llvm-locstats/llvm-locstats.py
===================================================================
--- llvm/utils/llvm-locstats/llvm-locstats.py
+++ llvm/utils/llvm-locstats/llvm-locstats.py
@@ -121,14 +121,16 @@
ax = fig.add_subplot(111)
init_plot(plt)
+ comparison_keys = list(coverage_buckets())
ax.bar(buckets, self.variables_coverage_map.values(), align='edge',
- tick_label=self.variables_coverage_map.keys(), width=0.4,
+ width=0.4,
label='variables of {}'.format(self.file_name))
ax.bar(buckets_to_compare,
locstats_to_compare.variables_coverage_map.values(),
color='r', align='edge', width=-0.4,
- tick_label=locstats_to_compare.variables_coverage_map.keys(),
label='variables of {}'.format(locstats_to_compare.file_name))
+ ax.set_xticks(range(len(comparison_keys)))
+ ax.set_xticklabels(comparison_keys)
props = dict(boxstyle='round', facecolor='wheat', alpha=0.5)
plt.text(0.02, 0.88,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77155.254237.patch
Type: text/x-patch
Size: 1036 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200401/edbaafa4/attachment.bin>
More information about the llvm-commits
mailing list