I have a Log count histogram:

DensityHistogram[myData, 100, {"Log", "Count"}, 
  ColorFunction -> "Rainbow", ChartLegends -> Automatic]

But ChartLegends -> Automatic generates an incorrect bar legend: it is linear and doesn't match the data. How can I generate the correct bar legend for a log-count density histogram?

The image depicts the linear (top - doesn't have the {"Log", "Count"} argument) histogram and the log-count histogram (bottom). They both have the same legend, which is wrong.



This is an extended comment.

It doesn't seem to happen in V9, so perhaps it's a version bug:

myData = RandomVariate[BinormalDistribution[.5], 1000]; 
DensityHistogram[myData, 10, #, ColorFunction -> "Rainbow", 
    ChartLegends -> Automatic] & /@ {{"Log", "Count"}, "Count"} // Row

Mathematica graphics

| improve this answer | |
  • $\begingroup$ Yes, must be. I just ran it in version 10 and the bar legends are incorrect. $\endgroup$ – earnric Oct 2 '15 at 21:07
  • $\begingroup$ Do you know how to generate the bar legend manually? I can't seem to figure it out. $\endgroup$ – earnric Oct 2 '15 at 21:08

This is a verified BUG in Mathematica 10.1.

| improve this answer | |
  • 1
    $\begingroup$ You mean verified by Wolfram Research? If not I would not give this as an answer. $\endgroup$ – Sjoerd C. de Vries Jan 11 '16 at 6:35
  • $\begingroup$ Yea. I got an email from Wolfram support confirming this was a bug in version 10. It was working in a previous version (9), but there's a problem with it now. $\endgroup$ – earnric Jan 12 '16 at 17:06

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.