Skip to main content
How are we doing? Please help us improve Stack Overflow. Take our short survey

All Questions

Tagged with
0 votes
1 answer
20 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
46 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
45 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
43 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
56 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
40 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
1 vote
1 answer
38 views

Can someone explain strange behavior trying to plot a non-differentiable function?

I have some data that I am using to generate a non-differentiable function and trying to plot it in R and I am observing unexpected behavior: namely, the output of the function during plotting seems ...
Edward Erisman's user avatar
1 vote
2 answers
49 views

Add a legend to a voronoi diagram with field values

I try to create a map with a voronoi diagram of some climate stations. I've already created the diagram and also colored the areas in the diagram with a fitting color. Now I want a continuous legend ...
Alexander Klug's user avatar
1 vote
1 answer
46 views

Forest plot with the forestplot() function

I am making a forest plot with the package forestplot and the function forestplot(). So far I have a plot that works, however, I would like to make some changes to customize it to my liking. So far ...
Charlie S's user avatar
1 vote
1 answer
78 views

How to put infinity and -infinity on a graph with plot

In the attached image I want to replace -1 by -Inf and 3 by Inf. This is the code: F <- function(x) { f <- NULL f[x < 0] <- 0 f[x >= 0 & x < 1] <- 0.4*x[x >= 0 & ...
Amelia's user avatar
  • 165
1 vote
1 answer
38 views

Error when ploting the original date with the predictions of the best models using curve()

I'm trying to plot the original date with the predictions of the best models using curve() because I'm working with polynomial models, but I keep getting this error: Error in curve(predict(best_models\...
Andreia Raposo's user avatar
0 votes
1 answer
35 views

Manually specifying x-axis limits with gglikert()

I am using the gglikert() function from the ggstats package to create horizontal stacked bar charts centered on the neutral response. I would like to know how to manually set the x-axis limits to 100% ...
ehickman0817's user avatar

15 30 50 per page
1
2 3 4 5
1066