edzer / hexbin

Hexagonal binning routines and plotting methods
36 stars 11 forks source link

Hexagon Overlap when Ploting 1.7M Point tSNE Plot #14

Open danich1 opened 4 years ago

danich1 commented 4 years ago

I'm was using this code (version 1.28.1) to bin 1.7M datapoints into hexagon bins for an online web graphic. I exported each bin's center using hexbin$xcm and hexbin$ycm; however, when I attempted to re-plot the graphic, I get a layout that has hexagons overlapping with one another. (Image produced below) Is there a reason for the hexagons overlapping? I have the data-table that was used to generate this plot, so if necessary let me know.

image

edzer commented 4 years ago

Please provide a reproducible example.

danich1 commented 4 years ago
library(hexbin)
df <- read.table("data/paper_dataset_full_pca_tsne.tsv", header=TRUE)
bins <- hexbin(df$tsne1, df$tsne2, xbins=25, IDs=TRUE)
plot(bins)

data.zip

Here is the R script. The visualization above is a custom visualization made by a co-worker within the lab I'm working in. That actually might be the cause of the hexbin overlap issue. If the provided example doesn't show any issues, then feel free to ignore this issue and close it.