All Questions
Tagged with continuous ggplot2
37 questions
0
votes
0
answers
273
views
Error: Discrete value supplied to a continuous scale
I am writing a code to make custom bland-altman plots. I saw that in one of my plots there was some proportional bias. Therefore I needed to transform my data. I used a transformation of difference/...
1
vote
1
answer
338
views
R ggplot: Size breaks for continuous variable
I am trying to create a scatterplot with different point sizes for a continuous variable R95p_e. However, I'd like to bin or create breaks for the continuous variable according to:
iris <- iris %&...
0
votes
1
answer
105
views
Colour geom_text by a continue variable
I'm using geom_text to add text to a ggplot. I'd like the colour of that text to relate to the value it contains. This is a continuous scale, so ideally >0 get increasingly red, and <0 get ...
2
votes
1
answer
72
views
Why does my continuous graph suddenly change if I change from >= to > on the piecewise function (ggplot2)?
I'm going to depict a continuous graph on R using ggplot2 library, which is based on piecewise function.
fun1 <- function(x){
ifelse(x<=-2, -1.5*(-x)^2, NA)
}
fun2 <- function(x){
ifelse(...
0
votes
2
answers
880
views
Bar plot using continuous variable and factor to color bars
I have a a dataset that looks like this but much bigger:
County <- rep(c("Alameda", "Clallam", "Clatsop", "Contra Costa", "Coos", "Curry")...
0
votes
1
answer
425
views
Plotting NMDS A continuous variable can not be mapped to shape ggplot2 but group variable seems to be character
I am trying to plot NMDS results using an example I found online. When I plot my group variable (which are 'S' and 'E') I get "Error in 'scale_f()': A continuous variable can not be mapped to ...
1
vote
1
answer
512
views
Plotting group proportions with continuous variable
I would like to plot the proportion of levels of a group alongside a continuous variable. Since the x-axis is continuous, it is not really possible to compute proportions at each point (since there is ...
0
votes
0
answers
82
views
I can´t add the data label to my plot, occurs this Error: Discrete value supplied to continuous scale
Hi I have this code which is working ok, but when I try show the data label I have an error that I don't know how to solve.
Error: Discrete value supplied to continuous scale
This code is ok.
ggplot(...
0
votes
0
answers
134
views
Cannot resolve Error: Discrete value supplied to continuous scale
I've looked at some of the popular threads on this error but none seem to help me with mine.
I'm working with data, trying to create a line graph with dates on the x and lines representing three ...
1
vote
2
answers
445
views
Change continious data to discrete ones to be used in ggplot
I'm having this data
return_cluster
year variable value
1 1988 V1 1.721150
2 1989 V1 5.288607
3 1990 V1 63.355563
4 1991 V1 47.516021
5 1992 V1 ...
0
votes
1
answer
892
views
Change labeling of continuous scale bar ggplot
I'm not even sure if this is possible to do with a continuous scale bar but I give it a try ;)
I have this data:
return_cluster
year variable value
1 1988 V1 1.721150
2 1989 ...
1
vote
1
answer
2k
views
How to have ggplot show a label for each and every tick mark
This may seem simple but the solutions that I have found have only made it more complex. Below is the reproducible code that I am using. A bit circuitous but that is part of the learning experience. ...
0
votes
1
answer
770
views
Create R ggplot2 discrete colour palette for gradient map with continuous values
Hy everyone!
I really need some help to create a discrete legend over a continuous map.
Here what I have so far: Here you see probability of occurrence of a plant species accordingly to 4 statistical ...
0
votes
1
answer
518
views
Plotting continuous and discrete data in the variable
I am working to plot a dataset of snow depth in a grid, with depth as a continuous variable.
But, some plots in the grid were partially covered. These are divided into plots >50% and <50% covered ...
0
votes
1
answer
259
views
using a third variable as a fill aesthethic in geom_histogram
I am trying to add an extra dimension to my histogram by using a continuous variable to fill the bars. The following syntax however, gives me grey bars:
ggplot(mtcars, aes(x = mpg, fill = hp)) +
...