![](https://secure.gravatar.com/avatar/60f3cc97f94fa3690ba406f8c1a7fc4f.jpg?s=120&d=mm&r=g)
On Fri, 2018-04-06 at 11:05 +1200, Henri Menke wrote:
Dear list,
In the MWE below I would like py to be px rotated by 90 degrees but the labels should not be rotated. Is it possible?
Cheers, Henri
---
I thought of using vardef but that is kind of verbose because I gave to repeat "rotated angle" three times. \startMPpage vardef orbital(expr angle) = save p ; path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (-2,-1) .. cycle ; image ( draw p scaled 6 rotated angle; label("\strut$+$",(+10,0) rotated angle); label("\strut$-$",(-10,0) rotated angle); ) enddef ; picture px, py ; px := orbital ( 0) ; py := orbital (90) ; draw px ; draw py ; \stopMPpage
\startMPpage
path p ; p := origin .. (2,1) .. (3,0) .. (2,-1) .. (-2,1) .. (-3,0) .. (- 2,-1) .. cycle ; picture px, py ; px := image ( draw p scaled 6 ; label("$+$",(+10,0)); label("$-$",(-10,0)); ) ; py := px rotated 90 ;
draw px ; draw py ; % meh :/
\stopMPpage