Questions tagged [beeswarm]
29 questions
4
votes
1 answer
Is there a way to customize the feature order in a SHAP beeswarm plot?
I'm wondering if there's a way to change the order the features in a SHAP beeswarm plot are displayed in. The docs describe "transforms" like using shap_values.abs or shap_values.abs.mean(0) to change how the ordering is calculated, but what I…

Eich Varkin
- 43
- 1
- 3
3
votes
2 answers
R visualization: sensible repel points on map (beeswarm?)
I'm trying to replicate approximately a map like this.
It depicts a small number of items (schools) spread across an area. For input I have the map of areas with a number for each of them. I would like to lay that out into a that many points around…

puslet88
- 1,288
- 15
- 25
2
votes
2 answers
Shapviz beeswarm plot color options
I'm plotting a beeswarm plot for shap values in R with shapviz command. I'm using the following code:
sv_importance(shp1, kind= "beeswarm")
However, I would like to increase the transparency of the dots in the plot. Do you have any suggestions about…

kris
- 109
- 6
2
votes
0 answers
R Change ggplot geom_quasirandom colors
R newbie on deck,
Hi everybody !
I wrote a code to visualize a geom_quasirandom (library GGbeeswarm ) for my dataset.
What works is to visualize it, but with 3 random colors for the 3 species in the dataset.
However, i do want to customize the…

mmnewbie1000
- 21
- 1
2
votes
0 answers
How to make geom_path correspond to geom_beeswarm points
I've been trying to visualize the association of several characteristics in a small sample.
Here is an example data:
set.seed(309)
dat <- data.frame(id=c(1:9, 5:9, 7:9),
count=c(sample(1:4,9, prob=c(.5,.3,.2,.1), replace = T),
…

1ABD
- 21
- 1
2
votes
1 answer
Beeswarm plot with force - add links to nodes
I've created a Beeswarm plot with d3v4 and d3.forceSimulation, and the points are where I want them to be:
var data = [
{ country: "Algeria", amount: 22, year: 2000 },
{ country: "Argentina", amount: 49, year: 1990 },
{ country:…

sprucegoose
- 486
- 9
- 25
1
vote
1 answer
Customise r beeswarm plot
I am using the beeswarm package in R and have some problems customizing individual datapoints. I am using below data and code.
library(beeswarm)
df <- data.frame(x = c(LETTERS), y = "1",
z = c(rnorm(26, 11, 4)))
beeswarm(z ~ y, data = df,
…

Sylvia Rodriguez
- 1,203
- 2
- 11
- 30
1
vote
1 answer
"TypeError: 'module' object is not callable" error when using beeswarm
I am try to use beeswarm to plot some data with the follow codes:
import beeswarm
from beeswarm import *
import numpy as np
d = np.array([0,1,2,3,4])
beeswarm([d])
Then the error comes as:
Traceback (most recent call last):
File…

Yeping Sun
- 405
- 1
- 6
- 18
1
vote
1 answer
R-package beeswarm generates same x-coordinates
I am working on a script where I need to calculate the coordinates for a beeswarm plot without immediately plotting. When I use beeswarm, I get x-coordinates that aren't swarmed, and more or less the same value:
But if I generate the same plot…

Max Jonatan Karlsson
- 347
- 2
- 11
1
vote
1 answer
Resetting all isolated forces in d3 forceSimulation
I am trying to create a swarm graph that transitions between a few states, but have hit a few roadblocks. The best way I've found to set this up is to cluster my nodes in the center and then isolate forceX and forceY based on my data. However, I am…

jrlars
- 91
- 8
1
vote
1 answer
Centrally aligned “Point-wise” colors in beeswarm
Is it possible to draw a beeswarm plot such that point-wise colors are aligned in the horizontal center? (I believe this would improve the readability a lot especially if the data is not as clear-cut as in the example.)
To achieve this plot with…

Felix Dietrich
- 127
- 1
- 11
1
vote
1 answer
How to set Individual colors in beeswarm (R)?
I want to plot some data using beeswarm in R, where the bg color of each point is defined by a column in my data. For example:
head(mydata)
## id provean color
## 1635 9.428 #fee5d9
## 1092 9.000 #fb6a4a
## 791 8.708 #ffffff
## 1472 7.596 …

Julio Diaz
- 9,067
- 19
- 55
- 70
1
vote
1 answer
Beeswarm plot data input
I'm trying to create a beeswarm plot in R with my specific dataset. I am not an R expert. My data looks like this:
group p1 p2 p3 p4
A .01 .1 n/a 1.9
A 2.0 n/a n/a .05
A n/a n/a n/a .3
B …

Nicros
- 5,031
- 12
- 57
- 101
0
votes
0 answers
Beeswarm using R with interactive feature
Can this interactive chart (see link below) from the Office for National Statistics be created using R software?
https://www.ons.gov.uk/visualisations/dvc2189/beeswarm/index.html
I would like to include a drop down with a list of data point titles…

JimmyGee
- 1
- 2
0
votes
0 answers
Adding a side boxplot to an existing side beeswarm plot
I created a side beeswarm plot with a sample data set using the following code:
x <- rnorm(300)
beeswarm(x, pch = 19,
col = c("black"),
side = 1)
This is the plot I got.
.
I'm trying to add a boxplot with the data to the left…

divsan
- 1
- 1