3
$\begingroup$

Question related to this one, except I need the same for the Graphics.

Lets say I have the following drawings:

Graphics[{  
  Line[{ Q, P, V }] ,
  Arrow[{P, P + v }] ,
  Arrow[{P, P + vx }] ,
  Arrow[{P, P + vy}] ,

  {Dashed, 
   Line[{Q + (dir1*d1), P + v,  V + (dir2*d2)}]
   },

  FontSize -> 16, Background -> RGBColor[1, 1, 1, 1],
  Text["Q", Q],
  Text["P", P],
  Text["V", V],
  }, Axes -> True]

But on my drawing sysytem (this drawing should illustrate part of it work), the screen coordinates goes from top to bottom (in reverse order). So I want to reverse it somehow.

$\endgroup$
  • $\begingroup$ Rasher's answer in the question you linked to is probably the way to go. $\endgroup$ – C. E. Apr 3 '14 at 6:40
  • $\begingroup$ I don't understand what he do in his answer. $\endgroup$ – tower120 Apr 3 '14 at 11:16
1
$\begingroup$

Rasher's code will be usefull here but we also have to Scale all the obcjets which is easy but no so simple as - in case of Plot.

Graphics[
 Scale[#, {1, -1}, {0, 0}] &@{Circle[{2, 2}], Arrow[{{3, 2}, {5, 3}}]}
 ,
 Axes -> True, AxesOrigin -> {0, 0}, BaseStyle -> {15, Bold}, 
 AxesStyle -> {Arrowheads@.05, Arrowheads[{-.05, 0}]}, 
 Ticks -> {Automatic, 
           With[{set = N@FindDivisions[{##}, 25]}, 
                Table[If[ Mod[i, 5] == 2, 
                         {set[[i]], -set[[i]], {.02, 0}},
                         {set[[i]], "", {.01, 0}}], {i, Length@set}]] &}]

enter image description here

$\endgroup$
  • $\begingroup$ What is #, ##, &@ ? :) $\endgroup$ – tower120 Apr 3 '14 at 17:00
  • $\begingroup$ Is it possible to do something with number 25 here {set = N@FindDivisions[{##}, 25]}? Which, I belive, you just pick. $\endgroup$ – tower120 Apr 3 '14 at 17:29
  • $\begingroup$ and how do I know the maximum "y" value of my drawings? $\endgroup$ – tower120 Apr 4 '14 at 3:36
  • $\begingroup$ What is MMA? What a function of two arguments? $\endgroup$ – tower120 Apr 4 '14 at 7:20
  • 1
    $\begingroup$ @Michael Good point. $\endgroup$ – Kuba Apr 22 '15 at 6:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.