Epilog ไม่ทำงาน

Oct 12 2020

ฉันพยายามใส่ลูกศรเพื่อแสดงจุดบนพล็อต

ListPlot[{Transpose[{temp1, lum1}], Transpose[{temp2, lum2}], 
  Transpose[{temp3, lum3}], Transpose[{temp4, lum4}]}, 
 PlotStyle -> {Hue[First@#2/12], Hue[First@#2/15], Hue[First@#2/18], 
   Hue[First@#2/21]}, 
 Epilog -> {Arrow[{{4.2, 3.6}, {4.4, 3.6}}], 
   Text["text", {4.4, 3.6}, {4.4, 4}]}, 
 ScalingFunctions -> {"Reverse", Identity}, PlotRange -> Full, 
 PlotTheme -> "Detailed", 
 FrameTicksStyle -> Directive[FontSize -> 22], 
 PlotStyle -> {Automatic, Green}, AxesLabel -> Automatic, 
 Frame -> True, 
 FrameLabel -> {Style["Temperatura Log T [K]", FontSize -> 22, Bold], 
   Style["Luminosidad Log L [\!\(\*SubscriptBox[\(L\), \(sol\)]\)]", 
    FontSize -> 22, Bold]}, ImageSize -> Large]

แต่ดูเหมือนว่า Epilog จะทำงานไม่ถูกต้อง ผลลัพธ์คือ

ในขณะที่ฉันคาดว่าจะเห็นลูกศรชี้ไปที่จุดสีเหลืองที่ (4.4,3.6)

คำตอบ

2 kglr Oct 12 2020 at 16:46
SeedRandom[1]
data = RandomReal[{3.5, 4.4}, {100, 2}];

ListPlot[data, Frame -> True, 
 ScalingFunctions -> {"Reverse", Identity},
 PlotRangeClipping -> False, 
 Epilog -> {Arrow[{{-4.2, 3.6}, {-4.4, 3.6}}], 
   Text[Style["text", FontSize -> Scaled[.05]], {-4.4, 3.6}, {Left, Bottom}]}]

Text[Style["text", FontSize -> Scaled[.05]], {-4.4, 3.6}, {-1, -1}] ให้ภาพเดียวกัน

คุณยังสามารถใช้Offset[{xprinterpoints, yprinterpoints}, {xpos,ypos}]ในอาร์กิวเมนต์ที่สองTextเพื่อระบุตำแหน่ง การใช้

  Text[Style["text", FontSize -> Scaled[.05]], Offset[{15, 5}, {-4.4, 3.6}], {-1, - 1}]

ด้านบนเราได้รับ

การใช้

Text[Style["text", FontSize -> Scaled[.05]], Offset[{15, -5}, {-4.4, 3.6}], {-1, 1}]

ให้

และ

Text[Style["text", FontSize -> Scaled[.05]], Offset[{-25, 0}, {-4.4, 3.6}], {-1, -1}]

ให้