Skip to content

Commit

Permalink
#23 The ticks are now more scarce even thought they still do not act …
Browse files Browse the repository at this point in the history
…like I want them to.
  • Loading branch information
ohtohalla committed Feb 23, 2022
1 parent f40497d commit 536265d
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion flask_searchengine_vis.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,22 @@ def visualise_search(input_dict):

matches_df = pd.DataFrame.from_dict(input_dict)
sns.set_theme()
sns.relplot(
plot = sns.histplot(
data=matches_df,
x = "hit",
y = "score",
)
for ind, label in enumerate(plot.get_xticklabels()):
if ind % 10 == 0: # every 10th label is kept
label.set_visible(True)
else:
label.set_visible(False)

for ind, label in enumerate(plot.get_yticklabels()):
if ind % 10 == 0: # every 10th label is kept
label.set_visible(True)
else:
label.set_visible(False)
return plt.show()


Expand Down

0 comments on commit 536265d

Please sign in to comment.