# Why doesn't PlotRange seem to work with ChromaticityPlot? [duplicate]

By default, Mathematica usually adds a little extra axes lengths in plots (in this case, for x<0 and y<0):

Plot[x^2, {x, 0, 5}] Which we can of course fix using PlotRange:

Plot[x^2, {x, 0, 5}, PlotRange -> {{0, 5}, {0, 25}}] Now I want to do the same with ChromaticityPlot, which by default has some strange axes range:

ChromaticityPlot[{}] However, even though PlotRange is an option for ChromaticityPlot, using it doesn't seem to totally work:

ChromaticityPlot[{}, PlotRange -> {{0, .8}, {0, .85}}] I say 'totally' because it does change the upper bounds of the axes, but it doesn't make the origin where the axes meet. In fact, actually, if you look closely, it adds a little extra to the upper bound of the axes too, even if it changes them.

Am I missing something simple? How can I do this?

• Set PlotRangePadding->None. You'll see similar behavior in your first plot if you set Frame->True. – N.J.Evans Sep 29 '16 at 18:43
• @N.J.Evans, ah, of course... I missed that it takes all Graphics options. So this happens here because ChromaticityPlot automatically has a Frame? If you make this an answer, I'll select it. – YungHummmma Sep 29 '16 at 18:51

ChromaticityPlot uses a frame rather than an axis, so you'll need to set the option PlotRangePadding->None.

Additionally, setting Frame-False,Axes->True is not enough, to get rid of the extra little bit of axis you see, so PlotRangePadding has to be explicitly mentioned in this case.

ChromaticityPlot[
{}
, PlotRange -> {{0.1, 0.5}, {0.1, 0.5}}
, Frame -> False
, Axes -> True
] vs.

ChromaticityPlot[
{}
, PlotRange -> {{0.1, 0.5}, {0.1, 0.5}}
, Frame -> False
, Axes -> True 