1
$\begingroup$

Here is a simple scenario

data = {{-0.5, 0.2}, {0.7, 0.1}, {1.4, -0.1}};
L0 = ListPlot[data, PlotStyle -> {Black, PointSize[Large]}, 
Frame -> True, AspectRatio -> 1, PlotRange -> {{-1.5, 2}, {-1, 1}}]

which gives

enter image description here

My question is very simple: for the given plot range (it should not be changed) how can I get the two axes divisions (blue and red) equal in size?

$\endgroup$

1 Answer 1

1
$\begingroup$
data = {{-0.5, 0.2}, {0.7, 0.1}, {1.4, -0.1}};
pr = {{-1.5, 4}, {-1, 1}};
L0 = ListPlot[data, PlotStyle -> {Black, PointSize[Large]}, 
  Frame -> True, 
  AspectRatio -> First[1/Divide @@ (Differences /@ pr)], 
  PlotRange -> pr]

Mathematica graphics

$\endgroup$
12
  • $\begingroup$ OK, but what if I also want a square frame? $\endgroup$
    – Vaggelis_Z
    Feb 21, 2015 at 16:19
  • $\begingroup$ Yes, I want the blue and red distances shown in the plot to be equal. $\endgroup$
    – Vaggelis_Z
    Feb 21, 2015 at 16:30
  • $\begingroup$ I want a square plot like that posted in which the distance between the tickmarks of the x-axis (blue line) to be equal in length with the distance between the tickmarks of the y-axis (red line). $\endgroup$
    – Vaggelis_Z
    Feb 21, 2015 at 16:44
  • $\begingroup$ The ranges should be fixed as PlotRange -> {{-1.5, 2}, {-1, 1}} $\endgroup$
    – Vaggelis_Z
    Feb 21, 2015 at 16:51
  • $\begingroup$ @Vaggelis_Z No, what I meant is that the blue and red segments will be of equal length in the image, but they will represent different variable ranges. $\endgroup$ Feb 21, 2015 at 16:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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