1
$\begingroup$

I have two histograms, both of the same data. In one I have adjusted the x axes with plotrange. This is the only difference. In this one however, suddenly the edges around the bars disappear. Is this a bug? How can i fix this? Can you guys reproduce this problem? I use mathematica 11.0.

I provided a sample of the dataset, the actual dataset is quite huge.

h = {4.090533193601222`*^-18, 5.353544384487416`*^-18,    5.604884982568158`*^-18, -1.062299368932436`*^-18,    5.430258394553261`*^-19, 0.01397074817653086`, -2.021331834648737`*^-18, -1.3662274274834008`*^-18, -3.587177675451973`*^-18,    2.9676022450847787`*^-18, -4.801501645332896`*^-18,    0.021430096635325954`, 0.015972735193928684`,    6.931800809587668`*^-18, 0.013170836894737123`,    2.0276354693644784`*^-18,    0.03941213547895494`, -1.6850428563452604`*^-20, -1.921075550792627`*^-18, 0.782483393686513`*^-18,    8.301028445248647`*^-18, 0.5316568230488358`*^-18,    9.12039994662496`*^-19, -7.916533109748828`*^-18, -1.5226355809978349`*^-18, 1.2405278854721606`*^-17,    0.019780985396967075`, 0.025243348273234652`,    1.0042996987076577`*^-18, -2.9195091354240463`*^-18, -1.0336610445375661`*^-18, -1.3455978089893752`*^-18,    2.3612940018925938`*^-18, 2.814298954961558`*^-18,    1.549153556680915`*^-18,    8.120229190514635`*^-20, -8.735036967087865`*^-19,    8.661841138318455`*^-19, 0.027101596811743858`,    1.5411016838228066`*^-18, -6.963075930344526`*^-18, -5.166655732109912`*^-19, -6.4383831135075665`*^-18, -6.949950507701524`*^-18,   0.01674155445728549`, -1.509597795215209`*^-18,    5.167589911339037`*^-19,    1.5510246818323686`*^-18, -2.7008714829385187`*^-18, -6.680504120708871`*^-19};

Histogram[h, 200, PlotRange -> {{0, 0.02}, Full},  AxesLabel -> {"values"}, PlotLabel -> "title", ImageSize -> 1500]
Histogram[h, 200, PlotRange -> Full, AxesLabel -> {"Eigenvalues"},  PlotLabel -> "title", ImageSize -> 1500] 

Thanks in advance!

$\endgroup$
4
  • $\begingroup$ Normally this would be controlled with ChartStyle->Directive[EdgeForm[Black]] and I wouldn't normally jump to calling it a bug since MMA might use some internal heuristic to decide on the base style. But in this case, explicitly specifying the style does not fix the problem, so it probably is a bug in 11.0. $\endgroup$
    – N.J.Evans
    Commented Oct 19, 2016 at 14:07
  • $\begingroup$ Sorry, if forgot to mention that I tried that. It did not help. Did you have the same problem? Which version of mathematica did you try? To be specific, I have mathematica 11.0.1.0. If anyone knows a way around this, that would be helpful. $\endgroup$
    – MdV
    Commented Oct 19, 2016 at 14:40
  • $\begingroup$ Tried it on version 10.4 with explicit ChartStyle, got the same behaviour. I agree this looks like a bug. $\endgroup$
    – Musang
    Commented Oct 19, 2016 at 16:34
  • $\begingroup$ I reported it as a bug and it got accepted as such. Thanks for your help. $\endgroup$
    – MdV
    Commented Oct 21, 2016 at 9:56

1 Answer 1

2
$\begingroup$

Make sure the opacity is specified. For example, I have had disappearing edge forms in the past. I solved it using:

ChartBaseStyle -> EdgeForm[{AbsoluteThickness[1], Black, Opacity[5]}]

Good luck, Tommy

$\endgroup$

Your Answer

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

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