Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
Erotemic committed Oct 15, 2023
1 parent 1fc6792 commit 7ca697e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
3 changes: 2 additions & 1 deletion README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,8 @@ Known dataset biases are:
The following scatterplot illustrates trends in the space / time distribution of the images.

.. .. image:: https://ipfs.io/ipfs/bafybeibnofjvl7amoiw6gx4hq5w3hfvl3iid2y45l4pipcqgl5nedpngzi/analysis/scat_scatterplot.png
.. image:: https://i.imgur.com/tL1rHPP.png
.. image:: https://i.imgur.com/78EfIpl.png
.. .. image:: https://i.imgur.com/tL1rHPP.png
.. .. image:: https://imgur.com/DeUesAC.png
.. .. image:: https://imgur.com/q6XzSKa.png
.. .. image:: https://i.imgur.com/ne3AeC4.png
Expand Down
10 changes: 8 additions & 2 deletions shitspotter/plots.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ def update_analysis_plots():
fig.savefig(dump_dpath / 'images_over_time.png')

fig = spacetime_scatterplot(coco_dset)
fig.set_size_inches(np.array([6.4, 4.8]) * 1.5)
# fig.set_size_inches(np.array([6.4, 4.8]) * 1.5)
fig.set_size_inches(np.array([6.4, 6.8]) * 1.5)
fig.tight_layout()
fig.savefig(dump_dpath / 'scat_scatterplot.png')

Expand Down Expand Up @@ -169,6 +170,11 @@ def spacetime_scatterplot(coco_dset):
text = '💩'

label_to_color = ub.dzip(hue_labels, kwplot.Color.distinct(len(hue_labels)))

chunked = list(ub.chunks(label_to_color.items(), nchunks=24))
selected = [c[0] for c in chunked[:-1]] + [chunked[-1][-1]]
selected = dict(selected)

emoji_plot_pil(ax, img_locs, text, label_to_color)
# emoji_plot_font(ax, img_locs, text, label_to_color)

Expand All @@ -179,7 +185,7 @@ def spacetime_scatterplot(coco_dset):
# name = pt['name']
# name = img_locs.iloc[idx]['name']

kwplot.phantom_legend(label_to_color)
kwplot.phantom_legend(selected)
return fig


Expand Down

0 comments on commit 7ca697e

Please sign in to comment.