r - how to put multiple plotmeans on one plot -


itemprop = "text">

I have the following data:

  x = structure (list (y1 = c (107. 37271 9 264016, 118.8632 99 513623, 122.16,25,15,227, 111.23322750 9 519, 92.5830204386651, 94.5195626032137, 104.412919961795, 91.3601725324563, 10.2253785 9 52 9 59, 178.771878 9 45058, 144.9 51255075154, 155.5 96666 92633, 174 9 61110441768, 120.832044563506, 136.643512128174, 135.187051040663, 180.2858 999 83425, 158.394853261036, 5 9 .408612698416, 210.9 22565 9 04703, 200.6372148 9 7327, 212.170348364241, 189.1760 9 660446, 19.6882878482191, 19.28 9 0862 9 5862, 209.44375842308191, 213.663792465693, 212.051141677785, 178.1957772597738), GP = c (1) , 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3 , 3, 3, 3, 3, 3), y2 = C (23.43466 99162695, 23.565 9 73096538, 25.6831595647438, 26.2750453870631, 27.4124437247719, 26.6151271841002, 18.3542500476327, 25.6479059225537, 22.7590841129755, 28.3977047665418, 49.5381487676808, 52.6323571458394, 52.0 9 78945 491726, 47.9337311261507, 40.2061776362212, 59.8929725029682, 55.0611040997365, 54.3854566071441, 45.3167212599129, 49.4203766938382, 65.3710290649776, 83.0698942827895, 89.5332774858779, 71.9625027199287, 85.8762119093763, 69.1433238492174, 84.3 9717174747, 83.6843406930946, 75.1866926526086, 80.4928087390204) .names = c ("y1", "gp", "y2"), line.Name = c ( NA, -30L), class = "data.frame") & gt; & Gt; Head (x) y1 gp y2 1 107,37272 1 23,43467 2 118,86330 1 23,56598 3 122,16252 1 2568316 4 111,23323 1 26,27505 5 92,10591 1 27,41244 6 92, 58302 1 26,61513 & gt; & Gt; & Gt; Plotman's (x $ y1 ~ x $ gp) & gt; Plotman's (x $ y2 ~ x $ gp)  

I want to plot the meaning of the two pillars of the same group column on a conspiracy. I can make 2 plots, but how can I keep them on a plot? I do not want the equivalent (MFRO) function, but want the same Wi-axis graph on the same plot. Plotmains function is in the GraftLt package Thank you for your help.

Normally you can do something like this:

  plotmeans (X $ y1 ~ x $ GP, ylim = c (0220)) plotmeans (x $ y2 ~ x $ GP, add = TRUE)  

which will be a warning return (that you ignore ) Because plus = true is defined by both plot () (which does not use it) and plotCI () Uses) In the specific case of your data, you get additional warnings because come Immeasurable intervals are very small to plot properly - if you understand for your data, you can either circle a log scale with a small range of Y range - neither of which are especially good for me Looks:

  #Smaller y range plotmeans (x $ y1 ~ x $ GP, ylim = c (60,120)) plotmeans (x $ y2 ~ x $ GP, add = TRUE) # Log scale plotmeans (x $ y1 ~ x $ GP, ylim = c (20,220), log = 'y') plotmeans (x $ y2 ~ x $ GP add = TRUE)  

If any of these Not satisfactory, you can try plotting a 2000x2000 pixel device - e.g.

  png ("file.png", 2000,2000) Plotman's (x $ y1 ~ X $ gp, ylim = c (0,220)) Plotman's (x $ y2 ~ x $ gp, add = TRUE) dev.off ()  

The error bars that are enough to display is OK.


Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -