Aes, short for "aesthetics" is an R Library, used to "Generate aesthetic mappings that describe how variables in the data are mapped to visual properties (aesthetics) of geoms." The aesthetics tag should **not** be used to reference software's artistic merit.
Questions tagged [aesthetics]
210 questions
0
votes
0 answers
RColorbrewer not changing plot colors on geom_bar - R
I am working on a plot where my dataset is a simple column of numbers,
count1 -> c(10,10,10,10,9,8,6,4,4,3,3,3)
for the y-axis, and just a list of room numbers for the y-axis. The data is arranged so that count1's highest values are placed on the…

Emery
- 31
- 1
- 8
0
votes
0 answers
R Shiny how to get ggplot to do color/shapes by dplyr filters
the following code works(without any color/shape inputs), however trying to make the points different shapes/colors has proved difficult, I'm not sure what the problem is.
I'm trying to have:
year/range have a yellow outline around the…

Ellie
- 415
- 7
- 16
0
votes
2 answers
Stacked histogram plot in R
I want to plot a histogram with ggplot of the counts of the variable. However, I want the bars to each show the relative fraction of a second (categorical) variable.
For example the sum of four variable is always 1. I want to plot a histogram based…

user3978632
- 283
- 4
- 17
0
votes
1 answer
Alpha aesthetic doesn't work with geom_segment - why?
I've been playing around with some football data and came across the problem with alpha aesthetic use. Basically I tried to plot some passes on the football pitch created as here:…

jakes
- 1,964
- 3
- 18
- 50
0
votes
0 answers
Position Dodge Function ggplot for regular plots R
I'm trying to create a plot through the regular R plot function plot()
but I need to find a way to do something like position = "dodge" in ggplot.
I can't use ggplot, since I'm using a cuminc function, and it wont let me - unless I use…

aiali
- 1
0
votes
0 answers
Easiest way of editing labels in legend when using color and shape in aes
I wonder if there is a function like:
scale_color_hue()
but for shapes.
Editing the labels of a legend when using colors in aes is esay with that function, but I cannot do it when mixing colors and shapes.
For instance, the command:
ggplot(subdata,…

Bub Espinja
- 4,029
- 2
- 29
- 46
0
votes
1 answer
How to properly use variable in ggplot?
I have found an issue, that I was unable to understand. Can someone please point to an explanation?
In ggplot, if I use/don't use "$" with variable name , it gives different result. Please see the example below,
library(ggplot2)
df <-…

Droid-Bird
- 1,417
- 5
- 19
- 43
0
votes
0 answers
Aesthetics error when trying to colour map with gradient in R using ggplot
I am trying to create a map, showing data on a certain metric in 2007, with the colour on a gradient rather than banded.
The response showed here from SlowLearner (with the blue map) looks like it would get the results I want, so I have adapted…

Jaccar
- 1,720
- 17
- 46
0
votes
1 answer
Keep black border of symbols when drawing points colored and shaped based on variables on a map (geom_point)
My question is somewhat related to this thread but I'd like to actually have the black border for each symbol since I have instances where symbols overlap and I think having the border would help. However, I have color and shape based on a variable…

silver
- 15
- 7
0
votes
0 answers
How to highlight subset of values in scatter plots?
I want to highlight a subset of values in a scatter ggplot. However I get an error message and I dont know how to fix it (I am new in computational analysis) Here is the command:
ggplot(table, aes(x=soma_1.5.2.5h, y=PGC_1.5.2.5h)) +
…

M.B
- 1
0
votes
1 answer
ggplot geombar aesthetics issues
trying to plot a stacked bar plot in ggplot. Having a hard time changing the position of the legend and the color scheme used by the default settings.
I have some data that's been melted into 5 columns called R1, R2, R3, variable, value
stackedCE…

user7871651
- 13
- 4
0
votes
1 answer
aes_string with color asthetic
To get a list which have 2 ggplot objects, my function gscatFn2 as below.
Instead of using column name "Week" of the data frame, I want to use column index 7 for aesthetic mapping as below. But error message:
Error in sort.list(y) : 'x' must be…

Soon
- 491
- 3
- 16
0
votes
0 answers
Drawing slope graph in R using ggplot, Error: Aesthetics must be either length 1 or the same as the data
I want to create a slope graph in R like this using ggplot
https://rud.is/b/2013/01/11/slopegraphs-in-r/
after cleaning the data and melt the data frame i ran into an error like this:
Error: Aesthetics must be either length 1 or the same as the…

Bao Tran Truong
- 1
- 2
0
votes
0 answers
Fill color in overlayed geom_polygons
I am having trouble filling in the polygon plots in my R Shiny App.
My code:
library(shiny)
library(leaflet)
library(DT)
library(ggplot2)
library(dplyr)
r_colors <- rgb(t(col2rgb(colors()) / 255))
names(r_colors) <- colors()
plotdata <-…

madhatter5
- 129
- 2
- 15
0
votes
1 answer
Can't set colour manually with ..count .., geom_point and facet_wrap
I've seen a lot of variations on this problem, as well as the error message I get. However, none of the situations is like what I'm trying to do. Say I have some data that looks a bit like this:
r <- c("zero", "r", "zero", "zero", "r", "r", "r",…

JoeF
- 733
- 1
- 7
- 21