16
$\begingroup$

Bug introduced in 8.0 or earlier and persisting through 11.0.1 or later


In a recent posting, Belisarius solved a problem related to the display of arrows on the x and y axes by setting ImagePadding->None.

My question is: why do the parameters of Arrowheads interfere with the default settings of ImagePadding? Or is something else going on?

The following illustrates what I am referring to:

Grid[{Table[Plot[1/x^5, {x, -20, 20}, AxesStyle -> Arrowheads[{0, k}]], 
{k, {.0003, .0015, .003, .015, .03}}]}, Frame -> All]

images

Below are the same plots, with ImagePadding set to None.

Grid[{Table[Plot[1/x^5, {x, -20, 20}, AxesStyle -> Arrowheads[{0, k}], 
ImagePadding -> None], {k, {.0003, .0015, .003, .015, .03}}]}, 
Frame -> All]

more plots

The arrowheads are plotted but too small to be seen at the present scale.

$\endgroup$
13
$\begingroup$

It is most likely a bug in the image size calculation routine.

Notwithstanding the arrowheads' sizes are going to be considered as absolute values in image "pixels" for drawing them, when the image size is being calculated the routine reserves enough space to draw the arrows as if they were specified in plot coordinates.

Look in the following example how a 0.05 y axis space is calculated because that is the size of the arrow heads.

Framed@Plot[1/x^5, {x, -9, 9}, AxesStyle -> Arrowheads[.05], 
  Frame -> True, ImagePadding -> All, 
  PlotRange -> {Automatic, {Automatic, .01}}]

Mathematica graphics

$\endgroup$
  • 3
    $\begingroup$ Seems convincing. Also, I notice that by constraining the maximum y value (through PlotRange) to .01, you heighten the effect. And by changing it to a max of .1, the effect disappears. $\endgroup$ – DavidC Oct 5 '12 at 17:53
  • 1
    $\begingroup$ and +1 for not confusing me with zero-length arrowheads... :) $\endgroup$ – cormullion Oct 5 '12 at 18:31

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.