Data Visualization in R for ecologists (LESSON 2) Scatterplots!

แชร์
ฝัง
  • เผยแพร่เมื่อ 9 ก.พ. 2025

ความคิดเห็น • 3

  • @shahfaisal1942
    @shahfaisal1942 3 ปีที่แล้ว +2

    Very fruitful sir.

  • @siyingchan6485
    @siyingchan6485 3 ปีที่แล้ว +1

    I have different categories. How do I colour the different groups? I've got 4 groups. Helpppp :(

    • @RforEcology
      @RforEcology  3 ปีที่แล้ว

      One way to do it is to use the "col" argument in the plot() function. If you create a column in your dataset that represents the different groups as the numbers 1, 2, 3, 4, then you can say 'col = my_data$groups' in the plot function and the points will be colored based on each group. The different numbers represent different colors. Hope that helps!