1
$\begingroup$

Why is the plot produced by

Plot[x + .5, {x, 2*.33*3, 3}]

not nicely aligned to the y-axis? Or alternatively, why doesn't the y-axis originate at x=2*.33*3?

enter image description here

$\endgroup$
  • 2
    $\begingroup$ Look up AxesOrigin $\endgroup$ – Feyre Nov 6 '16 at 15:38
  • $\begingroup$ AxesOrigin /. Options@Plot[x + .5, {x, 2*.33*3, 3}] $\endgroup$ – dionys Nov 6 '16 at 16:15
  • 1
    $\begingroup$ Plot[x + .5, {x, 2*.33*3, 3},AxesOrigin->{0,0}] $\endgroup$ – dionys Nov 6 '16 at 16:16
  • $\begingroup$ Why not state these as answers? $\endgroup$ – bonifaz Nov 6 '16 at 17:16
1
$\begingroup$
plot = Plot[x + .5, {x, 2*.33*3, 3}]

enter image description here

AxesOrigin /. Options @ plot

{2., 2.5}

while the beginning of the plot is set at

orig = {2*.33*3, 2*.33*3 + .5}

{1.98, 2.48}

To fix:

Plot[x + .5, {x, 2*.33*3, 3}, AxesOrigin -> orig]

enter image description here

$\endgroup$

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.