MDS: conversion of a code for 3D plot into a code for 2D plot

Dear all,

I am an inexperienced user, so apologies for my question.

I have a code from a previous study for the 3D plot, however 2D is more suitable for my data.
The 3D code is below. I have tried an obvious solution changing plot3d to plot2d and changing a number of axes, however I receive an error message advising me that the plot2d function does not exist. Maybe experienced users can give me some tips? Thank you very much in advance.
plot3d(genBilRus.wm.3mod.conf$D1, genBilRus.wm.3mod.conf$D2, genBilRus.wm.3mod.conf$D3, type="n", size=1, lit=F,
xlab="D1", ylab="D2", zlab="D3", axes=F)
segments3d(segends(genBilRus.wm.3mod.conf$D1, genBilRus.wm.3mod.conf$D1),
segends(genBilRus.wm.3mod.conf$D2, genBilRus.wm.3mod.conf$D2),
segends(genBilRus.wm.3mod.conf$D3, min(genBilRus.wm.3mod.conf$D3)), col="grey30")
text3d(genBilRus.wm.3mod.conf$D1, genBilRus.wm.3mod.conf$D2, genBilRus.wm.3mod.conf$D3, texts=row.names(genBilRus.wm.3mod.conf), cex=1)

We don't really have enough info to help you out. Could you ask this with a minimal REPRoducible EXample (reprex)? A reprex makes it much easier for others to understand your issue and figure out how to help.

If you've never heard of a reprex before, you might want to start by reading this FAQ:

1 Like