11
$\begingroup$

I'd like to modify this chart to relocate the z axis label so it's not over printing the values.

data = RandomReal[{0, 100}, {100, 2}]; Histogram3D[data, 20, "ProbabilityDensity", AxesLabel -> {Style["Mean Rate (tph)", "Text"], Style["Duration (minutes)", "Text"], Style["Probability Density", "Text"]}, ImageSize -> Large, PlotLabel -> Style["Concentrator Run Duration and Mean Rate", 18], ChartStyle -> TSGblue, ViewPoint -> {Pi, Pi, 2}] 

enter image description here

I can rotate the label but the values are still over printed.

enter image description here

$\endgroup$
3
  • $\begingroup$ Filling in the label background may help a bit: AxesLabel -> {Style["Mean Rate (tph)", "Text", Background -> White], Style["Duration (minutes)", "Text", Background -> White], Style["Probability Density", "Text", Background -> White ]} $\endgroup$ Commented Mar 14, 2013 at 5:14
  • $\begingroup$ You could also use fewer ticks on z: Ticks-> {Automatic,Automatic,{0,.0005,.0010}} $\endgroup$ Commented Mar 14, 2013 at 5:19
  • $\begingroup$ related Q/A Collision of axes labels and ticks $\endgroup$ Commented Mar 15, 2013 at 3:10

4 Answers 4

8
$\begingroup$

Some improvement can be achieved by filling in the background of the axess labels and by reducing the number of ticks on z.

AxesLabel -> {Style["Mean Rate (tph)", "Text", Background -> White], Style["Duration (minutes)", "Text", Background -> White], Style["Probability Density", "Text", Background -> White ]} Ticks -> {Automatic, Automatic, {0, .0004, .0008}} 

Mathematica graphics

$\endgroup$
4
$\begingroup$

Seems very hard to control the position of the labels. But at least it's easy to make the labels more readable.

Histogram3D[data, 20, "ProbabilityDensity", AxesLabel -> {Panel@Style["Mean Rate (tph)", "Text"], Panel@Style["Duration (minutes)", "Text"], Framed[Panel@Style["Probability Density"], FrameMargins -> 25, FrameStyle -> None]}, PlotLabel -> Panel@Style["Concentrator Run Duration and Mean Rate", 18], ChartStyle -> "Pastel", ImageSize -> 600, ViewPoint -> {Pi, Pi, 2}] 

enter image description here

$\endgroup$
3
  • $\begingroup$ Are those OSX Panels? By the way, you are hardly a "Mathematica novice" at this time; you should remove that from your profile. $\endgroup$ Commented Mar 15, 2013 at 2:01
  • $\begingroup$ @Mr.Wizard Yes, I'm on OSX, but I don't know how their appearance differs on other platforms. (And I still feel relatively novice-like compared with you lot!:) $\endgroup$ Commented Mar 15, 2013 at 7:37
  • 1
    $\begingroup$ On Windows 7 they are boring: i.sstatic.net/JsLZz.png. (True, you're not Leonid yet but you are no novice either.) $\endgroup$ Commented Mar 15, 2013 at 7:47
4
$\begingroup$

It's not an elegant solution but if you include ImagePadding and also offset the label with whitespace, this should work:

data = RandomReal[{0, 100}, {100, 2}]; Histogram3D[data, 20, "ProbabilityDensity",AxesLabel -> {Style["Mean Rate (tph)", "Text"], Style["Duration (minutes) ", "Text"], Style[" Probability Density", "Text"]}, ImageSize -> Large, PlotLabel -> Style["Concentrator Run Duration and Mean Rate", 18], ChartStyle -> TSGblue, ViewPoint -> {Pi, Pi, 2}, ImagePadding -> {{40, 150}, {0, 0}}] 

histogram with image padding

$\endgroup$
0
$\begingroup$

I may be late to this party but another helpful hack is to include line breaks in the axis labels. Something like this worked for me:

AxesLabel -> Table[Style[zz, Background -> White], {zz, {"x0","x","\n \n \n \n \n v"}}] 
$\endgroup$

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.