Take the 2-minute tour ×
Mathematica Stack Exchange is a question and answer site for users of Mathematica. It's 100% free, no registration required.

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.

share|improve this question
    
Rasher's answer in the question you linked to is probably the way to go. –  Pickett Apr 3 at 6:40
    
I don't understand what he do in his answer. –  tower120 Apr 3 at 11:16

1 Answer 1

up vote 1 down vote accepted

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

share|improve this answer
    
What is #, ##, &@ ? :) –  tower120 Apr 3 at 17:00
    
@tower120 You will find more about those signs in FAQ. Here we are creatinng a function, which is more clear in Rasher's answer. We can put a function of two arguments to ticks and it will aplly ticks according to it. Take a look at documentation fo Ticks, Details and Options section at first. –  Kuba Apr 3 at 17:15
    
Is it possible to do something with number 25 here {set = N@FindDivisions[{##}, 25]}? Which, I belive, you just pick. –  tower120 Apr 3 at 17:29
    
@tower120 yes, feel free to do what you need ;) 25 stands for the number of divisions and Mod[-,5] is displaing each 5th, where the rest are only ticks with no label. –  Kuba Apr 3 at 17:32
    
and how do I know the maximum "y" value of my drawings? –  tower120 Apr 4 at 3:36

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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