79695561

Date: 2025-07-09 11:51:53
Score: 1
Natty:
Report link

# Create the data frame

data <- data.frame(

Weight = c(20, 25, 30, 35, 40, 45, 50, 55, 60, 65),

Thorax_L_Con = c(15.4, 15.9, 16.3, 16.8, 17.0, 17.5, 17.9, 18.1, 18.4, 18.7),

Thorax_L_Hei = c(15.9, 16.5, 16.9, 17.2, 17.7, 18.4, 18.8, 19.6, 19.9, 20.1)

)

# Set margins: bottom=2in, left=2in, top=1in, right=1in

# Convert inches to lines (approximate: 1 inch ≈ 4.8 lines)

par(mar = c(4.8, 9.6, 4.8, 9.6))

# Plot the first line

plot(

data$Weight, data$Thorax_L_Con,

type = "b",

pch = 16, # solid circle

lty = 1, # solid line

col = "blue",

xlab = "Weight (cg)",

ylab = "Thorax Measurements (mm)",

ylim = range(c(data$Thorax_L_Con, data$Thorax_L_Hei))

)

# Add the second line

lines(

data$Weight, data$Thorax_L_Hei,

type = "b",

pch = 17, # triangle

lty = 2, # dashed line

col = "red"

)

# Add a legend

legend(

"topleft",

legend = c("Thorax_L_Con", "Thorax_L_Hei"),

pch = c(16, 17),

lty = c(1, 2),

col = c("blue", "red")

)

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Arianne Britney Piad