Skip to content
This repository has been archived by the owner on Sep 4, 2024. It is now read-only.
/ pointgrid Public archive

Transform a 2D point distribution to a hex grid to avoid overplotting in data visualizations

License

Notifications You must be signed in to change notification settings

YaleDHLab/pointgrid

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Note: This repository has been archived

This project was developed under a previous phase of the Yale Digital Humanities Lab. Now a part of Yale Library’s Computational Methods and Data department, the Lab no longer includes this project in its scope of work. As such, it will receive no further updates.

Pointgrid

Transform a distribution of 2D points to a grid that preserves the global distribution shape. Useful for avoiding overplotting in data visualizations.

Before

before

After

after

Installation

pip install pointgrid

Usage

from pointgrid import align_points_to_grid
from sklearn import datasets

# create fake data
arr, labels = datasets.make_blobs(n_samples=1000, centers=5)

# get updated point positions
updated = align_points_to_grid(arr)

updated will be a numpy array with the same shape as the input array arr.

About

Transform a 2D point distribution to a hex grid to avoid overplotting in data visualizations

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages