How to center y-axis labels between two mirrored barplots in ggplot2?
I have a data.table in R with three columns: group, low, and llarge. I’ve converted this into a long format using melt, and now I want to create a ggplot barplot with the group labels centered between two mirrored barplots – one for low and another for large.
Geom_line not connecting all paired points
I am interested in plotting paired samples from my dataset. Here, I have 4 samples taken from blood and 4 samples taken from SF (which are paired). I am interested in plotting the variable “freqcd8bytissue” for this paired analysis using geom_line and geom_point in ggplot2, with each sample being plotted as a separate point. This is then facetted by a variable “clusters_names”.
Pyramid plot text alignemnt
I created the plot below, but I’m not sure how to adjust the figures to ensure they are positioned inside the plot area. Additionally, I would like to display the percentage savings, calculated as the difference between the “azul” (2024) and “red” (2023) values, prominently in the middle with larger font sizes. Can someone help me with these adjustments?
Text adjustment stacked barplots
I created the below plot but I would like the month name to be near the figure. For example “January:13.31”. Is there a way to do this
How to unify the legend with points only?
I am trying to plot the loess fit curves in each of sub-figures. There are three models and each model will have a color to represent. The code to generate the plot is as follows,
R, ggplot2 – time on x axis
In R I have a data frame with bid and ask prices for a single day. Here is an example:
Is there an R-function to interpolate contours which fits a shapefile?
I am plotting contour maps using R. The program is able to plot the contours but it is not able to interpolate the plot to fit and fill the provided shapefile. Is there a specific function in R which can help to generate a proper contour map? The program is below. The image I obtained is also attached.
ggplot: How to merge two legend boxes and give legend keys any desired order?
I am trying to make a plot with a few stacked bars and a dot (corresponding to their sum). However, I am having troubles giving the legend keys the positions I want. In particular, I have two questions:
R: prevent break in line showing time series data using ggplot geom_line
Using ggplot2 I want to draw a line that changes colour after a certain date. I expected this to be be simple, but I get a break in the line at the point the colour changes. Initially I thought this was a problem with group
(as per this question; this other question also looked relevant but wasn’t quite what I needed). Having messed around with the group
aesthetic for 30 minutes I can’t fix it so if anybody can point out the obvious mistake…
How to plot two separate pairs of points and connect them using ggplot?
I would like to plot two separate pairs of points on a ggplot and then connect them by a line. I know I could create two ggplots and then combine them together, but then no line would be connecting them. How would I connect the pair of points?