Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
-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 (! ...
Marek Pospíšil's user avatar
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 ...
Fable's user avatar
  • 57
-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 ...
wishywashytreant40's user avatar
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 ...
ltong's user avatar
  • 543
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, ...
LulY's user avatar
  • 1,070
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 ...
Michael 's user avatar
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 ...
S. Robinson's user avatar
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 ...
Oggy's user avatar
  • 13
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, ...
mrlaperche's user avatar
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 ...
Gabe Runte's user avatar
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 ...
Aria Nova's user avatar
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 ...
pienkowski's user avatar
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 &...
arezaie's user avatar
  • 335
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 ...
Yukiyaama's user avatar
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....
CHIA's user avatar
  • 71

15 30 50 per page
1
2 3 4 5
1067