Change the scale of BoxPlot to logarithm after a certain data value

4 views (last 30 days)
Hello,
I'm working on comparing different data items using boxplots stacked side by side (one boxplot for each item - total of 6 boxplots). Quick context:-
a) The context in which Iam working, the usage of 25th percentile and traditional definition of IQR/Outliers is not very helpful. Firstly, I have need for custom percentages so instead of the standard percentile cutoffs I'm using 50th, 75th, 90th, 95th and 99th (lower whisker endbar, lower part of box, "median", upper part of box, upper whisker endbar) for the core boxplot. I plan to use the code in http://www.mathworks.com/matlabcentral/answers/31774-box-plot-with-percentiles-known and this works well.
b) I also want to plot the maximum with a dot or cross (not interested in plotting any points between 99th%ile and the maximum). The nature of data is such that for certain data items (not all data items) the max might be extremely high while the 50th/75th/90th/99th etc are fairly closely clustered. This makes the boxplot difficult to interpret on the whole as 50th/75th/90th/99th will be squashed up together.
In order to solve b), the idea I thought is to have the Y axis of the boxplot in normal scale till a certain data value (I will determine this dynamically by passing as an argument) and for percentiles exceeding that data value, the Y axis uses log scaling. This way I can see the metrics Im most interested in and yet not miss out on the maximum (max plays a role in decisioning process depending on how extreme it is). And yes, to avoid ambiguities as to where the log scale starts I would like to explicitly indicate with a horizontal dotted line or some other way that log scale starts after that dotted line.
Is this possible? Any code would be highly appreciated.
(note, 50th percentile for all the data items is greater than 1 so logarithms will never cause any data error because of non-positive input etc).
Thanks
Hari
  1 Comment
Hari
Hari on 6 Oct 2015
Pls let know if the question is not framed clearly Or if am asking for something impossible...or probably there is a better way to achieve what I want to do

Sign in to comment.

Answers (0)

Tags

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!