Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8585295
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T22:01:25+00:00 2026-06-11T22:01:25+00:00

I am using the following code for drawing a plot on a graph in

  • 0

I am using the following code for drawing a plot on a graph in Stata. I want to draw multiple plots on the same graph. Is that possible? Can anyone kindly tell me what to do?

What I want to do is to have multiple plots of the following types in the same graph.

Further clarification: There will be multiple means and CIs for each value of X, i.e. one mean and CI for each simulation model. All the means and CIs for one simulation model will be connected together.

    clear 
    input str2 varname mean upper lower
    x1 30 25  35
    x2 50 20  80
    x3 60 50  70
    x4 60 55  65
    x5 65 55  75
    end

    encode varname, gen(varname1)   
    scatter mean varname1, xlabel(, valuelabel) || rcap upper lower varname1 || line upper mean lower varname1
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T22:01:26+00:00Added an answer on June 11, 2026 at 10:01 pm

    As @whuber kindly mentioned, we need to use || to draw more things. I used the following code to draw more than one plot of the type I need on the same graph. Thanks.

        clear 
        input str2 varname mean upper lower
        x1 30 25  35
        x2 50 20  80
        x3 60 50  70
        x4 60 55  65
        x5 65 55  75
        end
    
        encode varname, gen(varname1)
    
        input str4 varname4 mean4 upper4 lower4
        x1 40 35  45
        x2 60 30  90
        x3 70 60  80
        x4 70 65  75
        x5 75 65  85
    
        scatter mean varname1, xlabel(, valuelabel) || rcap upper lower varname1 || line upper mean lower varname1 ||scatter mean4 varname1, xlabel(, valuelabel)  || rcap upper4 lower4 varname1  ||  line upper4 mean4 lower4 varname1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to draw some sort graphics on winform using following code : private
I have code which will draw a graph that scales if the user attempts
I'm drawing an xna project on a winforms Control using the following code: this.GraphicsDevice.Present(MainForm.GamePanelHandle);
I'm drawing an image and outputing it to web page using the following code:
I am trying to embed a font using the following code that I found
I am drawing a concave shape in canvas using the following code: var ctx
I want to convert a linearlayout to an image.I am using the following code
I am using the following code to draw on a single monitor: Point cursorLocation;
I'm using the following code to draw text on a bitmap : using (Font
Using following code I try to get updated list of checkbuttons' corresponding text values,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.