All Questions
16
questions
0
votes
0
answers
30
views
R - making emdash among negative values when labelling discrete bins
I'm cutting a dataframe shp into discrete bins, some of which are negative values. I'm wondering how I can make an em dash in between negative values (e.g. "0 - -2.5") for the labels to ...
1
vote
0
answers
58
views
Correct UTC symbol alignment in ggplot legend
I am trying to create a plot with ggplot, I have created the view that I want, however, it requires the use of 8 (\u) and 16 bit (\U) UTC symbols in the legend key elements. When I include both in the ...
3
votes
0
answers
62
views
Plot a boolean/qualitative table with R
I am looking for a way to create a table in R for categorical data. The elements in the table should be symbols, and these symbols should be displayed in a legend.
This table from the ICILS 2018 ...
1
vote
1
answer
256
views
Special symbols in legend in R
I want to write special symbols in the legend in a plot, like 5<# of events<=20. So far I've tried multiple codes but didn't work.
I don't know why this doesn't work
bquote(5<~"# of ...
1
vote
0
answers
220
views
ggplot2: add 2 digits to legend symbol
I've been trying to change the legend symbols of my plot. This question here was really helpful, however I'm trying to create symbols that go from 1-33, and whenever I have 2 digits I get an error. Is ...
2
votes
2
answers
45
views
How do I repeat a symbol in the legend of a ggplot to gain a better view of the symbol?
I have just started the du Bois challenge as part of #tidytuesday, and am on challenge 1: Comparative Increase of White and Colored Population in Georgia
The original graph has the "WHITE" ...
1
vote
1
answer
3k
views
how to add manually a legend to ggplot [duplicate]
I want to add manually a legend to ggplot in r. The problem of my code is that it does not show the right symbols (blue point, blue dashed line and red solid line). Here the code and the plot.
...
2
votes
1
answer
966
views
Inserting math symbols in legends of R plots
I am using survminer to produce a survival plot with 2 survival curves, one for patients who had received 4 Packed Red Blood Cells (PRBC) units during surgery and one for patients who received more ...
0
votes
1
answer
173
views
How to increase legend symbols without overlaying shape
I'm doing a plot for a shiny app and I need to increase the size of symbol in a ggplot legend. I have multiple aesthetics (shape and color) that depending on some conditions need to be merged into one ...
0
votes
2
answers
158
views
In base R plot, how can deploy multiple pchs to the same symbol?
plot(1, pch = 19, cex = 3, col = "red")
points(1, pch = 1, cex = 3, col = "black", lwd = 2)
legend("top",
"sym",
pch = 19,
col = "red",
cex = 2,
pt.cex = 4)
legend("top",
"sym",
...
1
vote
1
answer
2k
views
R ::tmap plot and display NA values in legend
I want to map point data with results of bird counts. The point size should be scaled according to the number of birds that were counted. If an area has not been counted an x should be displayed for ...
1
vote
1
answer
4k
views
ggplot2: how to assign math symbols to legend labels for two different aesthetics?
I am trying to produce a legend with math symbols. I tried different options but none works. I don't find a way to assign labels directly to the guide_legend and ggplot doesn't seem to understand ...
2
votes
3
answers
3k
views
R Plotly: Change legend symbol
How do I change the default legend symbols in R plotly? In my example below, I would like both symbols to be dots in the legend. The legend entry for "A" should be a blue circle.
(By default, Plotly ...
1
vote
2
answers
504
views
Align symbols in the legend
I woult like to insert a legent to my plot. I tried this with the following code:
plot(1:4)
legend("topleft",legend=expression(paste(theta[1]==7%*%10^-4,sep=" ",theta[2]==-14%*%10^-4),
...
0
votes
1
answer
3k
views
Greek Symbols in ggplot2 legend (density plot)
I created a density plot in ggplot and tried to use greek symbols in the legend. That is what I tried:
value1 = 0.8
value2 = 0.8
value3 = 0
greeks <- list(bquote(rho==.(value1)), bquote(rho==.(...