plotmath Questions

24

Solved

I have used the following ggplot command: ggplot(survey, aes(x = age)) + stat_bin(aes(n = nrow(h3), y = ..count.. / n), binwidth = 10) + scale_y_continuous(formatter = "percent", breaks = c(0, 0....
Batter asked 13/8, 2010 at 0:5

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...
Littlefield asked 12/8, 2019 at 19:18

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...
Eldredge asked 15/10, 2021 at 22:55

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...
Atbara asked 12/3, 2016 at 11:35

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...
Eyeleteer asked 18/5, 2011 at 12:41

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...
Stypsis asked 10/12, 2017 at 22:50

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 ...
Insignificancy asked 2/11, 2012 at 9:59

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....
Dagny asked 12/12, 2010 at 18:11

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...
Balloon asked 11/3, 2019 at 23:55

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...
Dietrich asked 20/9, 2018 at 17:6

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")...
Hausmann asked 22/8, 2018 at 23:39

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...
Aldos asked 22/2, 2018 at 2:36

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...
Chump asked 4/12, 2015 at 12:28

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...
Bromal asked 26/3, 2017 at 20:10

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 ...
Schnorkle asked 8/1, 2017 at 2:47

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...
Taintless asked 26/8, 2011 at 20:39

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))...
Regenerate asked 13/7, 2016 at 14:51

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...
Stoffel asked 28/4, 2016 at 18:51

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...
Backbite asked 10/8, 2015 at 19:52

© 2022 - 2025 — McMap. All rights reserved.