Questions tagged [jitter]

The Jitter responsibility is to compile intermediate code to machine code in run time.

See here for more info

203 questions
22
votes
3 answers

How to jitter both geom_line and geom_point by the same magnitude?

I have a ggplot2 linegraph with two lines featuring significant overlap. I'm trying to use position_jitterdodge() so that they are more visible, but I can't get the lines and points to both jitter in the same way. I'm trying to jitter the points and…
drgibbon
  • 405
  • 1
  • 4
  • 11
21
votes
3 answers

R: How to spread (jitter) points with respect to the x axis?

I have the following code snippet in R: dat <- data.frame(cond = factor(rep("A",10)), rating = c(1,2,3,4,6,6,7,8,9,10)) ggplot(dat, aes(x=cond, y=rating)) + geom_boxplot() + guides(fill=FALSE) + geom_point(aes(y=3)) + …
chao
  • 1,893
  • 2
  • 23
  • 27
14
votes
2 answers

Jitter text/labels with position_stack

Consider the following data.frame and chart: library(ggplot2) library(scales) df <- data.frame(L=rep(LETTERS[1:2],each=4), l=rep(letters[1:4],2), val=c(96.5,1,2,0.5,48,0.7,0.3,51)) # L l val # 1 A a 96.5 # 2 A b …
moodymudskipper
  • 46,417
  • 11
  • 121
  • 167
13
votes
2 answers

apply jittering to outliers data in a boxplot with ggplot2

do you have any idea of how to apply jittering just to the outliers data of a boxplot? This is the code: ggplot(data = a, aes(x = "", y = a$V8)) + geom_boxplot(outlier.size = 0.5)+ geom_point(data=a, aes(x="", y=a$V8[54]), colour="red", size=3) +…
Jack
  • 305
  • 1
  • 3
  • 10
12
votes
3 answers

Plotly: Create a Scatter with categorical x-axis jitter and multi level axis

I would like to make a graph with a multi-level x axis like in the following picture: import plotly.graph_objects as go fig = go.Figure() fig.add_trace( go.Scatter( x = [df['x'], df['x1']], y = df['y'], mode='markers' ) ) But also…
Daniel Zapata
  • 812
  • 3
  • 9
  • 31
12
votes
1 answer

How is jitter determined in ggplot?

I was looking over the documentation on jitter in ggplot while making some plots, and I realized that I don't really understand the argument. It states that the arguments are: Width: degree of jitter in x direction. Defaults to 40% of the…
tumultous_rooster
  • 12,150
  • 32
  • 92
  • 149
8
votes
3 answers

Inconsistent jitter in iOS game

I am working on a very simple vertical scrolling game for Unity iOS. My game is experiencing inconsistent jittering. I have searched the web extensively looking for a solution without any luck. I am using Unity version 5.3.4 f1. The Game A…
Anas iqbal
  • 1,036
  • 8
  • 23
6
votes
3 answers

How to add jitter in a data frame in R

Input: df = data.frame(col1 = 1:5, col2 = 5:9) rownames(df) <- letters[1:5] #add jitter jitter(df) #Error in jitter(df) : 'x' must be numeric Expected output: jitter will be added to the columns of df. Thanks!
Rashedul Islam
  • 879
  • 1
  • 10
  • 23
5
votes
1 answer

How to set seed for jitter in seaborn stripplot?

I am trying to reproduce stripplots exactly so that I can draw lines and write on them reliably. However, when I produce a stripplot with jitter the jitter is random and prevents me from achieving my goal. I have blindly tried some rcParams I found…
5
votes
1 answer

How to control for the amount of noise added to x, y spatial points in R?

Fairly novice R user, and I'm sure there's an easy solution for this - but I can't find it. I have a data frame with a series of spatial coordinates, as well as a host of other attributes. Many of the spatial coordinates are the exact same - and I…
Brewkeeper
  • 99
  • 9
5
votes
1 answer

Geom_jitter colour based on values

Is there a way to color the jitter points on a boxplot based on a numeric value, so for example: ggplot(data, aes(y = y_var, x = x_var)) + geom_jitter(size = 2, aes(color = ifelse(y_var < 5, "red", "black))) I've added this reproducible example…
mrpargeter
  • 339
  • 3
  • 12
5
votes
0 answers

Putting error bars on jittered points in R

I'm trying to plot a scatter graph with error bars in R using categorical data on the x axis, using the following code: Nesk <- read.table("E:\\R stuff\\Chapter 2\\Boxplots of nb\\NEnbNOINF.txt", header=TRUE, fill=TRUE) pd <- position_dodge(0.2)…
Whilux
  • 63
  • 6
5
votes
2 answers

Add jitter to grouped box plot using markers in R plotly

I'd like the interactive (that means they can be selected with box/lasso selection) jittered points to be displayed on the grouped boxplot. I came out of this question: Add jitter to box plot using markers in plotly. I want exactly the same but the…
potockan
  • 3,998
  • 3
  • 25
  • 37
5
votes
1 answer

Add jitter to box plot using markers in plotly

I made a boxplot: dat %>% plot_ly(y = ~xval, color = ~get(col), type = "box", boxpoints = "all", jitter = 0.7, pointpos = 0, marker = list(size = 3), source = shiny_source, key = shiny_key, hoverinfo =…
Taz
  • 5,755
  • 6
  • 26
  • 63
5
votes
2 answers

Jitter logic to remove unbox_any

I'm investigating the execution of this C# code: public static void Test(object o) where T : class { T t = o as T; } The equivalent IL code is: .method public static void Test(object A_0) cil managed { // Code size 13…
Dudi Keleti
  • 2,946
  • 18
  • 33
1
2 3
13 14