All Questions
15,993
questions
-1
votes
0
answers
36
views
Making lines not overlap
I am creating a DGE plot for 2 samples. I want the lines in the resulting plot to NOT BE STACKED on top of each other, bot to be next to each other (so that both are visible).
## Load packages
if (! ...
2
votes
2
answers
51
views
Ploting weekly data with base::plot with unique and evenly spaced labels
I am trying to create a simple scatter plot, so weeks on the x-axis and "cases" on the y with each indicated by a dot and note I can only use base R's plot(), no ggplot.
I have data with 156 ...
-1
votes
1
answer
41
views
Creating two Y-axes with the same X-axis [duplicate]
I am trying to create a plot for my stable isotope data from sequential dentine sampling which provides deltaN15 and deltaC13 data as well as age assignments. I would like to have the x-axis be the ...
0
votes
0
answers
27
views
Log scale not balanced in forest plot [closed]
I am creating a forest plot in R (code below) and want to transform my x-axis onto a log scale. However, my scale is not very balanced with the tick marks <1 more squished than the tick marks >1 ...
1
vote
2
answers
26
views
How to get the probability data from survfit function?
I plot cumulative incidence curves based on data from the survival::survfit() function. Following this vignette I do something like the following:
library(survival)
mgus2$etime <- with(mgus2, ...
0
votes
0
answers
11
views
How to use plot.metaMDS
I have result of a NMDS using metaMDS() and I would like to plot my species ordination plot using a grouping variable in my environmental data.
So I am wondering what determines the colour of the ...
0
votes
1
answer
31
views
XGBoost Tree Plots in mlr3
I'm trying to get a plot of a single tree from an XGboost model fit in mlr3, and I can't seem to find any examples. I know there's a way using the underlying xgboost (see here), which mlr3 calls, but ...
1
vote
1
answer
47
views
Visualization of graphs according to the size of the data
I am making some graphs using different datasets, but when I change the data the graph loses its shape and does not look good. I don't know if there is a way to write something in the code to make the ...
0
votes
0
answers
18
views
plot grid error 'Cannot convert object of class numeric into a grob.' but all of my object are class "gg"
I'm trying to generate a plot combining 9 plots using the function plot_grid.
Here is my script :
plot_grid(plot_grid(penchy, pver, pplante, ncol=3), plot_grid(p_adplante_benchy, p_adver_benchy, ...
0
votes
0
answers
21
views
How can I create interaction plots for categorical predictors of a gbm.step object in dismo?
I am attempting to use the dismo package to make interaction plots for my model. Other examples (such as this thread) give great tutorials for continuous predictors but I cannot understand how to even ...
0
votes
1
answer
46
views
ggplot2 change graph attributes like certain linewidth or graph size? [closed]
A function from an R package returns a ggplot2 plot object. How do I change the attributes in it, like in Python matplotlib, I can access the fig.axes[0].set_... functions?
There are a lot of ...
0
votes
1
answer
45
views
R Likert plot with only positive values is not horizontally centred (package likert)
I am creating a Likert plot using the Likert package in R. One variable (used in the repex below) is an ordered factor with only positive responses. The bar is not centered on the y-axis (i.e., top to ...
0
votes
1
answer
57
views
Why doesn't the function curves in R plot correctly when they exceed a functions boundry?
Let's say I have probability distribution function from some sort of function within a given boundry. Its total area is of course 1 within this boundry. It's defined as zero outside this boundry.
f &...
0
votes
1
answer
42
views
ggsurvplot Interprets Number of Observations as Levels in newdata Argument
I am experiencing an issue with the ggsurvplot function from the survminer package in R. When attempting to plot survival curves using ggsurvplot with the newdata argument, the function incorrectly ...
1
vote
1
answer
27
views
How to transform percentage form for variance decomposition
I have a data like this,
library(vars)
##### Step 1. dataframe #####
var_1 <- ts(c(0.0242964582, 0.0294573276, -0.0406138524, 0.0734349713, 0.2361871259, 0.2029464090,
-0.0674527667, -0....