2011-03-24 11 views
6

मुझे प्लॉट के अंदर सही ढंग से घूमने के लिए टेक्स्ट नहीं मिल रहा है, जबकि वही पाठ पूरी तरह से घूमता है। उदाहरण के लिए,मैं सही ढंग से घूमने के लिए पाठ कैसे प्राप्त करूं?

Plot[Sin[x], {x, -2 Pi, 2 Pi}, 
Epilog -> 
    [email protected][Rotate[Text["Sine", {Pi, 1/2}], -30 Degree]]] 

निम्नलिखित देता है।

enter image description here

पाठ विषम और शायद ही पठनीय है। मैं पाठ को सही तरीके से कैसे घुमा सकता हूं?

उत्तर

5

स्कूइंग होता है क्योंकि टेक्स्ट सीधे शामिल होता है और दो धुरी का स्तर समान नहीं होता है। आप Automatic करने के लिए AspectRatio सेट करते हैं पैमाने वही होगा और टेक्स्ट पठनीय:

Plot[Sin[x], {x, -2 Pi, 2 Pi}, 
Epilog -> [email protected][Rotate[Text["Sine", {Pi, 1/2}], -30 Degree]], 
AspectRatio -> Automatic 
] 

Mathematica graphics

पहलू अनुपात (जो शायद तुम क्या चाहते है) रखने के लिए, Inset में पाठ लपेट:

Plot[Sin[x], {x, -2 Pi, 2 Pi}, 
Epilog -> Inset[Rotate[Text["Sine"], -70 Degree], {Pi, 1/2}] 
] 

Mathematica graphics

4

तुम भीस्थानांतरित कर सकते हैंText अंदर:

Plot[Sin[x], {x, -2 Pi, 2 Pi}, 
Epilog -> Text[Rotate["Sine", -70 Degree], {Pi, 1/2}]] 

जो भी पहलू अनुपात से skewing से बचने जाएगा। rotated text

+0

मुझे यह भी बेहतर लगता है। –

संबंधित मुद्दे