Announcement

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

  • Plotting Gamma function simultaneously

    Any possibility one could plot two different gamma distributions at the same time

  • #2
    Here is an example of plotting two gamma densities on the same graph.
    Code:
    twoway function y=gammaden(2,1,0,x), range(0 10) || ///
           function y=gammaden(3,1,0,x), range(0 10) || ///
           , legend(label(1 "a=2") label(2 "a=3"))
    Click image for larger version

Name:	Graph.png
Views:	1
Size:	98.0 KB
ID:	1613714

    Comment


    • #3
      Thank you very much.

      Comment


      • #4
        Hi everyone.
        I am trying to mix plots, does anyone know if it is possible to illustrate log values of a variable and normal values in the same graph.
        I am combining 2 twoway plots:
        toway (scatter log10( x) log10( y)) || (connect x y if x==0) || (connect x y if y==0)

        but I don't get my scatter, if I then choose just ordinary values:

        toway (scatter x y) || (connect x y if x==0) || (connect x y if y==0)

        I get the combined scatter and line figure, but there was a reason behind me choosing the log10 version , as it is distributed in a strange way and log10 gives a more linear spread. Is there any solution for this?
        Last edited by Lida Khurrami; 10 Jun 2021, 07:41.

        Comment


        • #5
          stataforumScatter.gphIn other words, how to combine these tow
          Attached Files

          Comment


          • #6
            a
            Attached Files

            Comment

            Working...
            X