Hi everyone!
I have a quick question about the horizontal axis in a boxplot.
Suppose I have two variables X and Y, X=[1,2.3,4.6], for each value of X, I have a group of Y-values, so I want to draw a boxplot in matlab with horizontal axis the X-values.
I use the following code
boxplot(Y);
But the resulting plot only has lables 1,2 3 on its horizontal axis instead of the X-values.
Can I use any method to handle this problem?
Thanks very much for suggestions!
Best wishes,
Zuofeng
|
|
0
|
|
|
|
Reply
|
Zuofeng
|
5/20/2010 4:59:07 PM |
|
"Zuofeng " <shang@stat.wisc.edu> wrote in message <ht3por$599$1@fred.mathworks.com>...
> I have a quick question about the horizontal axis in a boxplot.
> Suppose I have two variables X and Y, X=[1,2.3,4.6], for each value of X, I have a group of Y-values, so I want to draw a boxplot in matlab with horizontal axis the X-values.
> I use the following code
>
> boxplot(Y);
> But the resulting plot only has lables 1,2 3 on its horizontal axis instead of the X-values.
> Can I use any method to handle this problem?
I am not certain, but possibly
boxplot(Y, 'Positions', X)
|
|
0
|
|
|
|
Reply
|
Walter
|
5/20/2010 6:49:04 PM
|
|
>> Suppose I have two variables X and Y, X=[1,2.3,4.6], for each value of X,
>> I have a group of Y-values, so I want to draw a boxplot in matlab with
>> horizontal axis the X-values.
>> I use the following code
>>
>> boxplot(Y);
>
>> But the resulting plot only has lables 1,2 3 on its horizontal axis
>> instead of the X-values.
>> Can I use any method to handle this problem?
....
> boxplot(Y, 'Positions', X)
This will position the boxes, but not change the labels. Try this out:
x = randi(3,100,1); % random group numbers
v = [1 2.3 4.6]; % desired group values
xx = v(x); % array of group values
y = xx + randn(size(xx)); % y data
boxplot(y,xx) % this gives the labels you want
boxplot(y,xx,'position',v) % this also positions the boxes
-- Tom
|
|
0
|
|
|
|
Reply
|
Tom
|
5/20/2010 7:48:50 PM
|
|
|
2 Replies
470 Views
(page loaded in 0.876 seconds)
Similiar Articles: Boxplot Y-Axis Change - comp.soft-sys.matlabThis is kind of a picky question but I would really appreciate any help. I have a y-axis label on a boxplot of around -4 x 10^-4 to 1 x 10^-4 (that i... boxplot - comp.lang.idl-pvwavehey all, As my help function of IDL is not longer working, I will ask my question here. Is it possible to make boxplots in IDL 4.5 edition? And if ye... Add baseline to Boxplot - comp.soft-sys.matlabA question about boxplot - comp.soft-sys.matlab Add baseline to Boxplot - comp.soft-sys.matlab A question about boxplot - comp.soft-sys.matlab Trendline question - comp ... Boxplot given a 5 number summary - comp.soft-sys.sasA question about boxplot - comp.soft-sys.matlab A question about boxplot - comp.soft-sys.matlab A question about boxplot - comp.soft-sys.matlab Boxplot given a 5 number ... How to display axis value on boxplot - comp.soft-sys.sas ...Hello again, Below is my code for creating boxplot of savings in each of ... A question about boxplot - comp.soft-sys.matlab How to display axis value on boxplot - comp ... BoxPlot Outliers Values Detection - comp.soft-sys.matlab ...A question about boxplot - comp.soft-sys.matlab BoxPlot Outliers Values Detection - comp.soft-sys.matlab ... I am using boxplot function to identify outliers. Re: How to display axis value on boxplot - comp.soft-sys.sas ...A question about boxplot - comp.soft-sys.matlab... about the horizontal axis in a boxplot ... so I want to draw a boxplot in matlab with horizontal axis the X-values ... Box Plot for multiple variables - comp.soft-sys.sasA question about boxplot - comp.soft-sys.matlab Box Plot for multiple variables - comp.soft-sys.sas In general , to produce Box plot we use PROC BOXPLOT DATA=SAS-data-set ... About sgpanel - comp.soft-sys.sasods pdf layout question - comp.soft-sys.sas About sgpanel - comp.soft-sys.sas ods pdf ... I am trying to produce boxplots but I keep getting a message that the variables ... Character variables to order horizontal axis in GPLOT - comp.soft ...A question about boxplot - comp.soft-sys.matlab Hi everyone! I have a quick question about the horizontal axis in a boxplot. Suppose I have two variables X and Y, X=[1,2.3 ... A question about boxplot [Matlab] - Adras.com - Solutions for your ...Hi everyone! I have a quick question about the horizontal axis in a boxplot. Suppose I have two variables X and Y, X=[1,2.3,4.6], for each value of X, I have a group ... R help - question about boxplot - Nabble - Free forum & other ...question about boxplot. Here is a question from an old guy: I want to use the boxplot function as follows: boxplot( p.prop ~ R + bins ) This command makes nice ... 7/23/2012 2:54:20 AM
|