Message Boards Message Boards

0
|
6592 Views
|
2 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Controlling the range of the vertical axis of a bar chart ...

Per attached (otherwise exactly what I want), how do I make the vertical axis of a bar chart have a range of, say, 0 to 0.5 ?

Attachments:
POSTED BY: Mark Tuttle
2 Replies

Perfect! I tried PlotRange but missed the use of Automatic. Apparently, that's key. Thank you. -- Mark

POSTED BY: Mark Tuttle
Posted 10 years ago

PlotRange is the option you need:

  nTrueTable2 = {"pTT", "pTF", "pFT", "pFF"};
    currentPs = {{{1/4, 1/4}, {1/4, 1/4}}, {{1/9, 1/9}, {7/18, 7/18}}, {{2/27, 4/27}, {23/54, 19/54}}, {{2/27, 4/27}, {10/27, 11/27}}};
    (BarChart[#, ChartLabels -> Automatic, ImageSize -> Small, PlotRange -> {Automatic, {0, 0.5}}] & /@ (Association[
           Table[nTrueTable2[[i]] -> #[[i]], {i, 4}]] & /@Flatten /@ currentPs)) // Row[#, "    "] &
POSTED BY: Jim Baldwin
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract