Hi Folks, I'd be grateful for some views on the following. When I say "plot y against x" I mean that y is on the vertical axis and x is on the horizontal axis. I acquired this usage so long ago that I can no longer remember how I acquired it, and therefore can not cite my "authority" for my usage. There can also be an implication that y is a function of x (or y is a "dependent" variable and x an "independent" variable). To the best of my knowledge, this is the standard usage. However, I have had a query which suggests that the "transposed" meaning may be quite frequently adopted, i.e. "plot x [horizontal axis] against y [vertical axis]" Google tells me that "plot y against x" throws up about 147 hits, while "plot x against y" throws up about 54 hits. One of the latter is unequivocal and comes from a respected department of mathematics: http://www.maths.lancs.ac.uk/dept/coursenotes/lab100/pdffiles/a12.pdf Q 12.1 A simple plot. Invoke Matlab in an Xterm window and position the Figure window so that you can see it properly. x = -3:5 % plotting values (range) y = 2*x + 3 % a linear function of x plot(x,y) % plot x against y and at least two refer to "Statistical analysis with R" (so maybe I'm not so off-topic after all), also unequivocal, e.g.: http://www.nbn.ac.za/Education/11-stats-2004/R1.8/r_workshop.pdf Example: Plotting functions Assume that you were to plot a function by hand. One possibility of doing it is to 1. Select some xvalues from the range to be plotted 2. Compute the corresponding y = f(x) values 3. Plot x against y 4. Add a (more or less) smooth line connecting the (x; y)points ... plot(x, y) # plots x against y (However, in R itself, "?plot" is discretely silent about what is "against" what!) I'd value commments on whether the above "transposed" usage is in fact sufficiently common (perhaps mainly in certain subject areas) as to constitute a "linguistic enclave" with a valid dialectal usage which is the opposite of the standard. Or maybe there isn't really a standard. This would help to respond to the query, which whether in writing something which uses "plot y against x" it would be worth while including an explicit explanation of which way round it is meant, so that it's clear to any reader, whichever dialectal group they belong to. There was also a related query on whether "regression of Y on X" could be understood the "wrong way round" and about usage of the phrase "a model for Y against X". Where regression is concerned, I don't think there is room for doubt and anyone who interpreted it on the lines of "X~Y" is simply wrong. "Model for Y against X", however, is not a standard phrase, I think (though clear enough if you make the analogy with "plot"), and would need the same disambiguation as "plot y against x" (if any is needed). With thanks! Best wishes to all, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 31-May-04 Time: 15:51:53 ------------------------------ XFMail ------------------------------
Engineers have been plotting stress (or strain, or log of either) as y against log(fatigue lifetime) as x for 100 years or more. Thus it appears that allowable stress is a function of required cycles, and that is how the plot is interpreted. The underlying regression, however, correctly treats observed lifetime as the dependent variable (even though it's plotted as x) and testing stress (or strain, in a strain-controlled test) as the independent variable (plotted as y). Errors are in the horizontal direction. The curve is just "plotted wrong." However, the convention of plotting stress (or strain) vertically and lifetime horizontally is so universal among engineers, that a statistician risks loss of credibility to present a curve with the axes exchanged, even though both plots have the identical underlying regression. Charles Annis, P.E. Charles.Annis at StatisticalEngineering.com phone: 561-352-9699 eFax: 503-217-5849 http://www.StatisticalEngineering.com -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch] On Behalf Of Ted Harding Sent: Monday, May 31, 2004 10:52 AM To: r-help at stat.math.ethz.ch Subject: [R] [OT] "plot y against x" Hi Folks, I'd be grateful for some views on the following. When I say "plot y against x" I mean that y is on the vertical axis and x is on the horizontal axis. I acquired this usage so long ago that I can no longer remember how I acquired it, and therefore can not cite my "authority" for my usage. There can also be an implication that y is a function of x (or y is a "dependent" variable and x an "independent" variable). To the best of my knowledge, this is the standard usage. However, I have had a query which suggests that the "transposed" meaning may be quite frequently adopted, i.e. "plot x [horizontal axis] against y [vertical axis]" Google tells me that "plot y against x" throws up about 147 hits, while "plot x against y" throws up about 54 hits. One of the latter is unequivocal and comes from a respected department of mathematics: http://www.maths.lancs.ac.uk/dept/coursenotes/lab100/pdffiles/a12.pdf Q 12.1 A simple plot. Invoke Matlab in an Xterm window and position the Figure window so that you can see it properly. x = -3:5 % plotting values (range) y = 2*x + 3 % a linear function of x plot(x,y) % plot x against y and at least two refer to "Statistical analysis with R" (so maybe I'm not so off-topic after all), also unequivocal, e.g.: http://www.nbn.ac.za/Education/11-stats-2004/R1.8/r_workshop.pdf Example: Plotting functions Assume that you were to plot a function by hand. One possibility of doing it is to 1. Select some xvalues from the range to be plotted 2. Compute the corresponding y = f(x) values 3. Plot x against y 4. Add a (more or less) smooth line connecting the (x; y)points ... plot(x, y) # plots x against y (However, in R itself, "?plot" is discretely silent about what is "against" what!) I'd value commments on whether the above "transposed" usage is in fact sufficiently common (perhaps mainly in certain subject areas) as to constitute a "linguistic enclave" with a valid dialectal usage which is the opposite of the standard. Or maybe there isn't really a standard. This would help to respond to the query, which whether in writing something which uses "plot y against x" it would be worth while including an explicit explanation of which way round it is meant, so that it's clear to any reader, whichever dialectal group they belong to. There was also a related query on whether "regression of Y on X" could be understood the "wrong way round" and about usage of the phrase "a model for Y against X". Where regression is concerned, I don't think there is room for doubt and anyone who interpreted it on the lines of "X~Y" is simply wrong. "Model for Y against X", however, is not a standard phrase, I think (though clear enough if you make the analogy with "plot"), and would need the same disambiguation as "plot y against x" (if any is needed). With thanks! Best wishes to all, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 31-May-04 Time: 15:51:53 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
It would not matter if the relationship you are trying to plot is monotonic and therefore invertible. If the relationship is non-monotonic and therefore not invertible, then it does matter which variable you call dependent, since in this latter case you have a multi-valued relationship. -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of Ted Harding Sent: Monday, May 31, 2004 10:52 To: r-help at stat.math.ethz.ch Subject: [R] [OT] "plot y against x" Hi Folks, I'd be grateful for some views on the following. When I say "plot y against x" I mean that y is on the vertical axis and x is on the horizontal axis. I acquired this usage so long ago that I can no longer remember how I acquired it, and therefore can not cite my "authority" for my usage. There can also be an implication that y is a function of x (or y is a "dependent" variable and x an "independent" variable). To the best of my knowledge, this is the standard usage. However, I have had a query which suggests that the "transposed" meaning may be quite frequently adopted, i.e. "plot x [horizontal axis] against y [vertical axis]" Google tells me that "plot y against x" throws up about 147 hits, while "plot x against y" throws up about 54 hits. One of the latter is unequivocal and comes from a respected department of mathematics: http://www.maths.lancs.ac.uk/dept/coursenotes/lab100/pdffiles/a12.pdf Q 12.1 A simple plot. Invoke Matlab in an Xterm window and position the Figure window so that you can see it properly. x = -3:5 % plotting values (range) y = 2*x + 3 % a linear function of x plot(x,y) % plot x against y and at least two refer to "Statistical analysis with R" (so maybe I'm not so off-topic after all), also unequivocal, e.g.: http://www.nbn.ac.za/Education/11-stats-2004/R1.8/r_workshop.pdf Example: Plotting functions Assume that you were to plot a function by hand. One possibility of doing it is to 1. Select some x-values from the range to be plotted 2. Compute the corresponding y = f(x) values 3. Plot x against y 4. Add a (more or less) smooth line connecting the (x; y)-points ... plot(x, y) # plots x against y (However, in R itself, "?plot" is discretely silent about what is "against" what!) I'd value commments on whether the above "transposed" usage is in fact sufficiently common (perhaps mainly in certain subject areas) as to constitute a "linguistic enclave" with a valid dialectal usage which is the opposite of the standard. Or maybe there isn't really a standard. This would help to respond to the query, which whether in writing something which uses "plot y against x" it would be worth while including an explicit explanation of which way round it is meant, so that it's clear to any reader, whichever dialectal group they belong to. There was also a related query on whether "regression of Y on X" could be understood the "wrong way round" and about usage of the phrase "a model for Y against X". Where regression is concerned, I don't think there is room for doubt and anyone who interpreted it on the lines of "X~Y" is simply wrong. "Model for Y against X", however, is not a standard phrase, I think (though clear enough if you make the analogy with "plot"), and would need the same disambiguation as "plot y against x" (if any is needed). With thanks! Best wishes to all, Ted. -------------------------------------------------------------------- E-Mail: (Ted Harding) <Ted.Harding at nessie.mcc.ac.uk> Fax-to-email: +44 (0)870 167 1972 Date: 31-May-04 Time: 15:51:53 ------------------------------ XFMail ------------------------------ ______________________________________________ R-help at stat.math.ethz.ch mailing list https://www.stat.math.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html