Announcement

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

  • Plots: x-axis label

    I am trying to plot a trajectory graph and want to label the x-values with actual years e.g. Tick 1 is labelled "0-3". However I am getting an error message. Syntax below:

    trajplot, xtitle("Age(years)") xlabel(1 "0-3" 2 "3-6" 3 "6-9" 4 "9-12" 5 "12-15" 6 "15-18" 7 "18-21" 8 "21-29") ytitle("psychotic episodes") ci

    ERROR Message below:

    invalid label specifier, : 1 0-3 2 3-6 3 6-9 4 9-12 5 12-15 6 15-18 7 18-21 8 21-29:

  • #2
    Fadzai,
    Try to label values before plotting your graph and see if it works.

    Comment


    • #3
      Please explain where you got trajplot as a community-contributed command (FAQ Advice #12).

      My guess is that trajplot needs a fix. The xlabel() option should probably be declared as xlabel(str asis) as the quotation marks are being stripped in your call.

      You might be best advised to discuss this directly with the program author, who doesn't appear to be active here.

      Noah Mkasanga's suggestion is good too, as

      Code:
      xlabel(1/8, valuelabel)
      is more likely to work than what you typed.

      Comment


      • #4
        Thanks for the advice. Will try both options

        Comment

        Working...
        X