plotmath Questions
24
Solved
3
Solved
If I create maps using geom_sf, the axis labels have the wrong symbol for degrees. I get degree symbols that are vertically centred in the text, rather than raised like superscipts.
For example,
li...
2
Solved
I have an issue creating axis tick labels that combine italic letters and input of variables.
Simply said, I want to call variables and insert text such as n = 1 below each label.
Here's an example...
2
Solved
Example code:
rsq <- round(cor(mtcars$disp, mtcars$mpg)^2, 2) # rsq = 0.72
ggplot(mtcars, aes(x = disp, y = mpg)) +
geom_point() +
geom_smooth(method = lm, aes(color = "Linear")) +
scale_co...
3
Solved
I want to have a new line in my bquote envrionment, how can I do this?
my code:
test<-c(1,2,3,4,4.5,3.5,5.6)
test2<-0.033111111
plot(test,c(1:length(test)))
segments(4,0,4,23,col="red",lwd...
Topaz asked 27/3, 2013 at 15:57
3
Solved
Any map I make with:
ggplot() + geom_sf()
produces the expected map, but does not show the degree sign correctly, as appears from the following picture.
The answer given in this answer on S...
Wive asked 12/3, 2020 at 14:42
6
Solved
I want to add a greek character to the y-axis of my barplot in R.
The problem is that I need this character to be integrated in the title. I want to write:
Diameter of aperture ("mu"m)
in the a...
2
Solved
I want to change axis labels dynamically using ggplot. The code below is a simple version of what I'd like to do. It correctly displays a degree symbol in the y axis.The commented out ylab lines of...
4
Solved
I have a plot which is generated thus:
ggplot(dt.2, aes(x=AgeGroup, y=Prevalence)) +
geom_errorbar(aes(ymin=lower, ymax=upper), colour="black", width=.2) +
geom_point(size=2, colour="Red")
I ...
3
Solved
I'm trying to place the results of a regression (i.e., R2) in a graph, but can't seem to figure out how to call a variable from within an expression (it pastes the variable name).
Here is my code....
1
Solved
I have a dataframe with several variables that I wish to label and then use in several ggplots. I have applied labels using the labeller package with the following code.
library(tidyverse)
librar...
2
Solved
I'm having trouble getting my plots to save using ggsave(). I keep getting this error:
Error in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, : invalid font type
I don't unders...
2
Solved
I am working on a custom function that can add two-line captions to plots and I want the caption to be formatted properly no matter what the user might choose to enter ("character" or "expression")...
2
Solved
From sfsmisc package I have an expression and I want to add a text before that. How can I add text on an expression?
library(sfsmisc)
v <- pretty10exp(500)
title <- paste("some text ", v)
pl...
Educative asked 2/5, 2018 at 22:8
1
Solved
I'm using expression() in my plot's x-axis label to create a square-root symbol over my measure's name to indicate that the data has been transformed using square-root transformation. However, my m...
3
Solved
I'm using the code below to generate a simple box plot in ggplot2:
# Libs data
data("mtcars"); require(ggplot2); require(ggthemes)
# Chart
ggplot(data = mtcars) +
geom_boxplot(aes(y = wt...
3
Solved
How can I combine text and math expressions in a plot's title. If I use paste the expression is converted to character. For example I want something like this as a title
$ARL_1$ curve for $S^2$
...
Faulk asked 29/11, 2010 at 9:27
1
Solved
SITUATION:
I have a ggplot diagram, where I want to add some text annotation. The text annotation should appear in two lines (for readibility and space), and each line includes some TeX formula:
...
Haematogenous asked 29/11, 2017 at 15:36
2
Solved
I was wondering how I can plot the positive infinity sign and -Infinity sign in plot?
Here is my R code (with no success):
plot(1, ty ='n', ann = F, xlim = c(-4, 6), ylim = c(-3.5, 1.5) )
text(c...
1
Solved
Is it possible to pass partially italicized text labels into ggplot? I have tried using the expression and italic commands (expression(paste(italic("some text")))), but these cannot be passed into ...
2
Solved
Following works, (copy & paste into R)
a=123
plot(1,1)
legend('bottomleft',legend=bquote(theta == .(a)))
I want to have multiple items in the legend.
All with greek letters.
As a simple exam...
1
I'm trying to use the female symbol, ♀ in my plot. It's pretty faint (well, it looks faint on my actual graph), so I was hoping to make it bold face.
df <- data.frame(x = c(0, 1), y = c(0, 1))...
0
I have 2 issues using function ggplotly in R:
Question 1 What are the ways to keep R plotmath expressions while converting ggplot2 plots to plotly format using function ggplotly?
Now the expres...
1
Solved
I'm trying to get a superscript for units of my y-axis using plotmath expressions referenced in several posts. I've looked through threads on using expression and also here, but it just isn't worki...
Stavropol asked 8/3, 2016 at 23:23
1
Solved
When I make a map using ggplot2 and attempt to italicize part of the figure title using a combination of expression() and italic() using a string, my map comes out as desired:
plottitle <- exp...
1 Next >
© 2022 - 2025 — McMap. All rights reserved.