Questions tagged [geom-area]

47 questions
1
vote
0 answers

How to make square plots using Geom_Area (GGplot)

I created 25 plots using the ggplots2 library and I'm especially interested in the Geom_Area function. However, I would like to create square plots, with wider x-axis instead of those small rectangle plots stacked next to each other. I used this…
Manfretto
  • 83
  • 5
1
vote
1 answer

Stacked ggplot2 geom_area reruns an empty graph

I am trying to us geom_area to produce a stacked area graph but it producing an entry graph. Here is an example library(dplyr) library(ggplot2) x = expand.grid(name = c("D01", "D02", "D03", "D04"), component = c("F", "W", "M", "V")) value = runif(…
Nile
  • 303
  • 2
  • 11
1
vote
2 answers

How to create a timeseries plot using facet_wrap of ggplot2

This is a follow up question on How to format the x-axis of the hard coded plotting function of SPEI package in R?. in my previous question, I had a single location dataset that needed to be plotted, however, in my current situation, I have dataset…
CForClimate
  • 335
  • 5
  • 19
1
vote
1 answer

Calculate sum and frequency of two different columns with multiple variables and plot using area graph

I have a data which looks like this: | Employee | Employee_id | Transaction_date | Expense_Type | Attendees | Vendor | Purpose | Amount…
hk2
  • 487
  • 3
  • 15
1
vote
1 answer

R geom_area and coord_polar conversion to plotly

I am trying to convert a ggplot polar chart to a plotly one. I am missing the cumulative of geom_area in plotly and the filled color for each trace that is not going to the origin for both trace. The goal is to be as closed as possible to the ggplot…
Clemsang
  • 5,053
  • 3
  • 23
  • 41
0
votes
0 answers

change colors' order in each plot of facet_wrap separately when plots are created by geom_area

I want to change the color's order in geom_area based on the size of the plot. In fact, I want to put the smaller plot forward and send the larger plot back. If I run the following code, the orange plot in the right panel is covered completely by…
ADEN
  • 99
  • 4
0
votes
0 answers

How can I fix the issue of showing the same tooltip value in all x-axis for area charts using ggplotly?

R ggplotly geom_area (area chart) tooltip issue - showing same tooltip value in all x-axis. I am facing tooltip issue in my projects while creating area charts using geom_area from ggplot package in R (for the tooltip, converted into plotly object…
Amrita
  • 1
  • 1
0
votes
1 answer

Geom_area not drawn when converted from a geom_line in a ggplot chart with a secondary y axis

I am trying to show tidal height as geom_area on a secondary y-axis, but have been unsuccessful so far. Here is my code/graph that I currently have: #Creating pH Time series plots both sites ggplot(data = RB_EOS, aes( x = Time, …
0
votes
1 answer

geom_area with fill colour based on value

I'd like to make a geom_area plot with the fill colour based on the y (or any other) value, similar to the geom_density_ridges_gradient function of the ggridges package. I could achieve this with multiple geom_cols but I want to have the nice smooth…
OnLeRo
  • 83
  • 1
  • 6
0
votes
0 answers

How to caclulate moving average for proportional data using zoo package (rollmean)

I have the sample dataframe as below, Where for each date the total 'value' score is 1 as the 'varible' is proportion. Now how can I calculate the zoo:rollmean for 'value' based on dates considering 'variable'? In the end I need to make areaplot…
Wasim
  • 13
  • 2
0
votes
0 answers

How to plot two different line plots using geom_line and, especially, geom_area

I'm asking for your advice and support to plot two lines of data using the geom_line and geom_area f(x) in Rstudio. It's pretty simple, but I can't fix the bugs from the final plot. I will appreciate your help! The code that I'm using is described…
0
votes
2 answers

ggplot2: Shaded area under line with categorical data on x-axis

I would like to have a shaded area under the line connecting values of categorical variables on the x-axis. Data: t <- structure(list(Indicator = c("Performance", "Relationship", "Inter", "Culture", "Focused", "Profit", "Knowledge", "Customer",…
Bloxx
  • 1,495
  • 1
  • 9
  • 21
0
votes
0 answers

Geom_area() with discrete x-axis

I have the following dataset: and I want a plot with PorcentajeElemento in the x-axis, PorcentajeNR in the y-axis, the colors according to UnidadAnatómica, but I would like to see it with different areas. So I have the following…
Marco ViCo
  • 27
  • 1
  • 5
0
votes
1 answer

Stacked graph not showing on chart. R ggplot geom_area

I am trying to show a stacked graph using an area chart. However, after i input the variables for x and y and the fill data, nothing shows on the graph. ggplot()+ geom_area(data=provinces,aes(x=variable,y=value,fill=Province.State)) Province.State…
lams
  • 352
  • 1
  • 10
0
votes
1 answer

ggplot2: geom_area producing different output than expected

I want to create a stacked area chart using geom_area() for a dataset which has dates a x-axis and frequency as y-axis. My dataset looks like this Date Variant. Frequency 2020-08-01 AY.1 0 2020-08-01 B.1.351 …
asmi.g
  • 13
  • 2