# Rotation of parallel lines

4 messages
Open this post in threaded view
|

## Rotation of parallel lines

 Dear list, Consider these two parallel segments in a plot. plot(c(1, 6), c(2, 2), type="n", xlim=c(0, 7), ylim=c(-2, 6)) segments(1, 1, 6, 1) segments(1, 3, 6, 3) How can I rotate the two lines together by a defined angle? Thank you all in advance. Best, Antonio ________________________ Antonio Rivero Ostoic Assistant professor, PhD AARHUS UNIVERSITY School of Business and Social Science Quantitative Analytics Group and Cognition and Behaviour Lab Bartholins Allé 10 DK-8000 Aarhus C T: +45 871 65421 M: [hidden email]         ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

## Re: Rotation of parallel lines

 On Nov 18, 2013, at 7:27 AM, Tonio wrote: > > > Dear list, > > Consider these two parallel segments in a plot. > > plot(c(1, 6), c(2, 2), type="n", xlim=c(0, 7), ylim=c(-2, 6)) > segments(1, 1, 6, 1) > segments(1, 3, 6, 3) > > > > How can I rotate the two lines together by a defined angle? Base graphics do not support object operations. You need to do the   calculation and redraw the plot. Either lattice or ggplot2 which depend upon the "grid" system would   have the possibility to "rotate" a component. -- David Winsemius, MD Alameda, CA, USA ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.