If you assign a guide to each plot and give them unique titles, you get just two legends
p3 <- p1 +
guides(
color = guide_legend( title = "condition 1" )
)+
ggnewscale::new_scale_color() +
geom_point(
data = mydata
, aes(
x = x
, y = y
, group = 1
, col = new_sample_name
)
) +
guides(color = guide_legend(title = "new name"))