Announcement

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

  • Line Chart with > 2 variables on the Y axis

    I have an Excel spreadsheet w/ data on systolic and diastolic blood pressure and heart rate. I have the dates of the measurements. In Excel, I can make a bar chart w/ the dates on the abscissa and the 3 variables on the ordinate. No problem. I tried to do this in Stata. I couldn't. I did get 2 of the 3 variables on the ordinate, but that was all, and it took a bit of finagling to do it. Is it possible to create a line chart w/ > 2 variables on the Y-axis in Stata?

  • #2
    The issue is that heart rate is not measured using the same units as blood pressure. You can have 2 y-axes, but that can be confusing for the reader. But as to if you can do it, the following illustrates:


    Code:
    webuse sp500, clear
    tw line open high low date, xtitle("")
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	93.4 KB
ID:	1735047

    Last edited by Andrew Musau; 24 Nov 2023, 16:58.

    Comment


    • #3
      Thanks, Andrew. That worked.

      Comment

      Working...
      X