I am new in Mathematica and I do not know how I can get the following into a square. I need 4 "active areas" but in a single square which I can easily access and manipulate. Here's what I've done so far:

Data = {
FHeight = -2.5; 
FWidth = 10; 
Fdiv1 = FHeight/GoldenRatio; 
Fdiv2 = FHeight/1.2; 
Fdiv3 = FHeight/Pi; 
Fdiv4 = FHeight/(E^2 - 1);

a = Graphics[Line[{{0, Fdiv1}, {10, Fdiv1}}], Frame -> True, 
  PlotRange -> {{0, FWidth}, {FHeight, 0}}]


b = Graphics[Line[{{0, Fdiv2}, {10, Fdiv2}}], Frame -> True, 
  PlotRange -> {{0, FWidth}, {FHeight, 0}}]


c = Graphics[Line[{{0, Fdiv3}, {10, Fdiv3}}], Frame -> True, 
  PlotRange -> {{0, FWidth}, {FHeight, 0}}]


d = Graphics[Line[{{0, Fdiv4}, {10, Fdiv4}}], Frame -> True, 
  PlotRange -> {{0, FWidth}, {FHeight, 0}}]


But I need all of that in a single square with a main independent coordinate system to get 1) the values ​​of the individual areas and 2) the values in the main coordinate system, like this:


Everyone tells me that this is easy to do, but I couldn't find anyone that can show me how to do it. That's why I ask the professionals here. Maybe someone here knows how to do it and has a simple solution at hand. I would be very grateful.

  • $\begingroup$ You can combine many primitives under the same Graphics. See the documentation. Try something like this: Graphics[{ Dashed, Green, Line[{{0, Fdiv1}, {10, Fdiv1}}], Red, Line[{{0, Fdiv2}, {10, Fdiv2}}], Cyan, Line[{{0, Fdiv3}, {10, Fdiv3}}], Magenta, Line[{{0, Fdiv4}, {10, Fdiv4}}], }, Background -> Darker[Gray], FrameStyle -> White, Frame -> True, PlotRange -> {{0, FWidth}, {FHeight, 0}}, AspectRatio -> 1] $\endgroup$ – flinty Sep 30 at 14:01
  • $\begingroup$ Hi @flinty, yeah that solves my "combination-problem", thanks for that, i didn't know, that i can use the function also "hierarchically", but now i understand the logic behind the function "Graphics" better. But that doesn't solve my other problem, do you have an idea, how i can solve the problem with the two coordinating systems? A little hint would be enough for me, i'll do the rest, because i want to learn it. $\endgroup$ – Karl560 Sep 30 at 20:25

Your Answer

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

Browse other questions tagged or ask your own question.