2
$\begingroup$

I have some depth distribution data for a number of species of marine fishes. Since I am dealing with depth distributions it is more conventional to plot such distributional diagrams with the surface (0 m) at the top of the chart and the greatest depth at the bottom.

How can one reflect the vertical axis when using DistributionChart so that the "surface" (0 m) is at the top of the frame and the greatest depth is at the bottom?

I've read over the options and other questions but don't seem to find a solution.

$\endgroup$
  • $\begingroup$ Labels can be added by using FrameLabel-> {"None, "meters"}, although I have yet to figure out how to style the labels so that the font size of that on the vertical axis can be made larger than that on the horizontal axis. $\endgroup$ – Stuart Poss May 27 '18 at 21:25
2
$\begingroup$

You can also use the option BarOrigin -> Top

SeedRandom[1];
DistributionChart[RandomReal[BetaDistribution[2, 1/4], {6, 100}], 
  BarOrigin -> Top, 
  ChartLabels -> CharacterRange["A", "F"], 
  FrameLabel -> {"datasets", "label"}]

enter image description here

$\endgroup$
  • $\begingroup$ This was just the fix I was looking for. Thanks. $\endgroup$ – Stuart Poss May 28 '18 at 4:14
2
$\begingroup$

Perhaps you can just use ScalingFunctions->"Reverse":

SeedRandom[1];
DistributionChart[
    RandomReal[BetaDistribution[2,1/4],{6,100}],
    ScalingFunctions->"Reverse"
]

enter image description here

$\endgroup$
  • $\begingroup$ This didn't work for my Distribution Chart, as it added a reflected axis at the bottom and negative values at the top, but plotted data as if it had negative values. The reflected values were left blank. $\endgroup$ – Stuart Poss May 28 '18 at 4:14

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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