Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: graph query


From   Ulrich Kohler <[email protected]>
To   [email protected]
Subject   Re: st: graph query
Date   Mon, 19 Jan 2009 16:55:57 +0100

Am Montag, den 19.01.2009, 06:38 -0800 schrieb Nikolaos Pandis:
> I was wondering if I would be able to get some help on the following:
> 
> I have data with 7 continuous variables. The first variable is displacement (in mm) and the other six variables are forces registered at the different displacements. Each of the 6 variables, that contain the forces data, represent 1 category (type of wire that produces the force). 
> 
> The data may be reshaped into long format and into 3 variables: 
> 1.displacement (0-3 mm for all categories), 2. forces, 3. wire category that produces the force.
> 
> I would like the plot into a single graph, having on the x axis the displacement variable, and on the y axis all the forces by the 6 categories. Additionally, I would like smooth the lines.

If I understand this correctly, you want something like this:

sort displacement
graph twoway ///
  || line force1 displacement ///
  || lowess force1 displacement ///
  || line force2 displacement ///
  || lowess force2 displacement ///
  || line force3 displacement ///
  || lowess force3 displacement ///
  || line force4 displacement ///
  || lowess force4 displacement ///
  || line force5 displacement ///
  || lowess force5 displacement ///
  || line force6 displacement ///
  || lowess force6 displacement ///
  || , legend(order(1 "Force 1" 3 "Force 2" 5 "Force 3" ///
       7 "Force 4" 9 "Force 5" 11 "Force 6"), rows(2))

I also bet that you will be not quite satisfied with this very first
attempt. My feelings are that you want to plot too much in one single
graph, and doing separate graphs for the smoothers and the line could be
an idea. But, as Martian said, it all depends ...

Hope this helps anyway

Uli

-- 
[email protected]
030 25491-361

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index