Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • how to control color according to my variables?

    Hello

    I have a variable named "method" and I want to create a plot for showing the results of my variables by different colors.
    Here's my code

    scatter sig i2,colorvar(method) xtitle("Scenario") ytitle("Power") clegend(off)

    but Stata told me "colorvar" is not a valid command

    May I ask how to solve it?

    Thank you!

  • #2
    My guess is that you were told that colorvar() is not a valid option and the reason is that you are there using Stata 18 syntax but are on some version of Stata before 18.

    Syntax introduced in Stata 18 won't work in earlier versions.

    https://www.stata.com/help.cgi?whatsnew17to18 explains that colorvar() was added in Stata 18.

    https://www.statalist.org/forums/help#version explains about telling us what version of Stata you are using if not the latest.

    If that guess is wrong, my next guess is that we need to see a data example including variables sig i2 method.

    Comment

    Working...
    X