COMPGROUPS.NET | Search | Post Question | Groups | Stream | About | Register

• Email
• Follow

```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

See related articles to this posting

```"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

```>> 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
>> 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

2 Replies
515 Views

Similar Articles

12/12/2013 2:39:39 PM
page loaded in 4862 ms. (0)

Similar Artilces:

Proc Boxplot
Hello everyone, How can I fix the code below so that SAS prints the vertical axis so that it reads from the bottom to the top on its side (i.e., so that the bottom of the letters face the Y-axis)? symbol1 v=plus c=bib; title ' '; proc boxplot data=temp ; plot expos*casectrl / boxstyle = schematic boxwidth = 8 cframe = vligb cboxes = dagr cboxfill = wh idcolor = salmon nohlabel; label expos = 'Exposure'; run; ...

Questions, Questions...
Hi! I took the routine from Gastronor.mdb: In the frmOrderDetails -> ITemID_AfterUpdate: Dim strFilter as String strFilter = "ItemID = " & Me!ItemID but it didn't work on win 2000 with access 2000. However, after playing around for a while, I found: Me!UnitPrice = ItemID.Column(2) to work just fine, even after updating prices in the tblItems. Anybody knows why? The routine in win 98/win nt in the footer of frmOrderDetails: =Sum((Price*Amount*(1-[Discount])/100)*100)) didn't either work. After testing and trying I finally discovered that =Sum(Price*Amount*Discount)...

Questions, Questions, Questions -- Well, really only two
This newsgroup seemed distribution non-specific so here goes: 1. Many companies who want to use linux, want it for email and web service. These systems don't need xwindows, and, in fact, as I understand it, not installing it not only saves resources but reduces security risk. Is there anywhere freely available a how-to install various current distributions of linux using text only, and installing mail, web and domain name service that is fairly easy for the uninformed to follow? Especially helpful would be a debian install. 2. Does anyone know of an encyclopedia, preferrably text-b...

Question and bonus question
Given an integer between 0 and 5000 (characters 0-9; no leading zero) can anyone suggest a non-iterative, non-recursive way of summing the individual digits? I'm just looking for a clever way to do what is easy with the obvious loop: Sum = 0 Do I = 1 to length(n) Sum = sum + substr(n,I,1) End Bonus Question: Can anyone suggest a mechanism to allow reading the TOC (Table of Content) of an Audio CD? The connection? The TOC contains frame numbers where each track starts. Do an integer divide by 75 and you get the time offset in seconds. Sum the digits of each of the start times...

All the interesting questions are software questions
A presentation attributed to Intel was posted in another group: http://www.beyond3d.com/content/articles/31 While the presentation is framed as a CPU-GPU confrontation, it really just presents as policy some trends that could have been predicted quite some time ago: 1. More simple (in-order cores) get you more bang for the buck than do mainstream OoO cores. 2. They also get you more bang per watt. 3. GPU's are already infringing on CPU territory and the trend is bound to continue. 4. Some problems are better suited to a GPGPU (general purpose GPU) than others. 5. The big question is...

Question
I have a history that I have written in MS Word. It is composed of text and images. Is Pagemaker the best program to use for setting up the pages images etc and if so how do I import a MS document into Pagemaker? Thanks folks, I know the questions are probably rather dumb but...... ;-) Wolf wrote: > I have a history that I have written in MS Word. > It is composed of text and images. > Is Pagemaker the best program to use for setting up the pages images etc and > if so how do I import a MS document into Pagemaker? > > Thanks folks, I know the questions are probably...

Question
Can anyone define the difference between ITS vs. simulation? Anne L. Michaels almichaels@dynasims.com "simarts" <almichaels@crashzoom.com> wrote in news:1125937604.488797.222670@g14g2000cwa.googlegroups.com: > Can anyone define the difference between ITS vs. simulation? Probably, if you'd care to say what "ITS" means. All the best, John. On Mon, 05 Sep 2005 15:06:43 -0400, "simarts" <almichaels@crashzoom.com> wrote: >Can anyone define the difference between ITS vs. simulation? What is ITS?... A.L. A.L. <alewando@alamakota.co...

Question
Hi, Can someone tell me why this little piece of php/mysql code fails? \$row = \$result->fetch_assoc(); if (\$clog) fwrite(\$logfile,"row['nametag'] {\$row['nametag']}\n"); if (\$row['nametag'] != 0) { if (\$clog) fwrite(\$logfile,"name {\$row['nametag']}\n"); } I've got this logfile where I am putting debug output. In the above, the first fwrite works -- it writes the name contained in the row value 'nametag'...

Question
I have this statement: DELETE FROM TMP_TABLE_MERGE WHERE EXISTS (SELECT 1 FROM TMP_TABLE_1 T1 WHERE TMP_TABLE_MERGE.OBJECT_ID = T1.OBJECT_ID) In both the table TMP_TABLE_MERGE and TMP_TABLE_1 the field OBJECT_ID is the primary key but in the Explain Plan the table TMP_TABLE_MERGE is acessed in full scan mode. Do someone knows how can I force the use of the primary keys? Thanks Pier On Sat, 4 Jan 2003 14:20:33 +0100, "Pier Gaetano Novara" <pgaetanoNoSpam@csc.com> wrote: >I have this statement: >DELETE FROM > TMP_TABLE_MERGE >WHERE EXIS...

Question
Hello, I have just subscribed to this group today and am reading some of the posts. I've tried looking for the answer to this question but can't seem to find it with any of the search functions. I'm looking for a game new game to play and I don't play many nor do I really keep up with trends so I'm looking for advice and suggestions. My favorite games are rpgs with turn based combat and extensive dialouge trees. My favorite game ever was Planescape: Torment though I had fun with Neverwinter Nights, mostly because of some of the downloaded modules for it. Genre is not imp...

question
Hello, I would like to know what EDIF and SDF are? Thanks, Neil They are my cousins from the side of the family that we don't talk about much. Thy don't spll wll ether. Did you try a web search? www.EDIF.org SDF = standard delay format Regards, Jim Neil Zanella wrote: > Hello, > > I would like to know what EDIF and SDF are? > > Thanks, > > Neil > -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jim Lewis Director of Training mailto:Jim@SynthWorks.com SynthWorks Design Inc. http://www.SynthWorks.com 1-503-59...

Newbie question...simple rule question...
Dear All, I am trying to understand the best way to write a rule which checks on all the elements. ------------- people(a). people(c). ok(b). ok(a). everybodyok_works :- findall(X,ok(X),List),maplist(people,List). everybodyok_bad :- people(X),ok(X). ------------- What am I missing? Is there a better way to write rule which says: "Everybody is ok if for all people we know has said they are OK." ? Thanks in Advance, Mans On 2005-08-11, mans <mshapshak@gmail.com> wrote: > Dear All, > > I am trying to understand the best way to write a rule which checks on > a...

ipfw question & portscan question
Using BrickHouse to set ipfw so that only port 80 is open (I serve several Web sites), I note lots of the following sort of stuff in console.log and system.log: Jan 27 06:17:34 Stella-Blue kernel: ipfw: 55005 Deny UDP 64.122.147.30:137 216.243.177.155:137 in via en0 Jan 27 06:25:29 Stella-Blue kernel: ipfw: 55005 Deny ICMP:8.0 216.243.190.220 216.243.177.155 in via en0 Jan 27 06:56:48 Stella-Blue kernel: ipfw: 55005 Deny UDP 210.13.22.79:1160 216.243.177.155:1434 in via en0 Jan 27 07:06:11 Stella-Blue kernel: ipfw: 55005 Deny ICMP:8.0 216.244.14.36 216.243.177.155 in via en0 Jan 27 07:09:...

Two related question. Question 1
I have two related question. Let me introduce a pure function f = #1^2 + #2 & Now. I want to make an operation over the function, for example to find its square and to call the result (the expected function f = (#1^2 + #2)^2 & ) c: c=f^2 However, I do not obtain this, as c[a,b] does not evaluate to (a+b)^2. Can anybody advise me how to obtain such a function without long substitutions. I would like to obtain something which is made for derivatives : In[11]:= Derivative[1][f] Out[11]= 2 #1& In[12]:= Derivative[2][f] Out[12]= 2& Regards ...

factoring book question and cast question.
What is recommended as the best practical factoring and coding in C++ book? (...if exists...) related topic: If I have well factored and designed C++ code in a fairly complex system, where if any would dynamic_cast<> statements be? Should dynamic_cast<> be the only really proper type of cast ideally that would exist?? Thanks a lot! todd. -- [ See http://www.gotw.ca/resources/clcm.htm for info about ] [ comp.lang.c++.moderated. First time posters: Do this! ] todma wrote: > What is recommended as the best practical factoring and coding in C++ > book? (...i...

64HDD setup questions (and RS232 question)
Yesterday I got fired from a real lousy job so had time to reformat my 64hdd setup. Originally it was a msdos box and worked fine. Then I formatted it to get rid of all the win 3.1 crap. I used freedos .9 version I think. 64hdd wouldn't boot right. I used an msdos 6.2 boot disk from then on. I wasn't sure if the msdos boot disk could install dos. Is it that 6.2 can only 'sys' FAT32? So I made two boot disks. One with msdos 5.0 and one with msdos 6.2. Then I formatted the hd from a FreeDos 1.0 boot cd and installed that os. (Is there an easier way to do this?) When I booted...

Hello all,I have got a question about the post increment operator. Consider thefollowing codeint i = 1;System.out.println(i);i = i++;System.out.println(i);The output is11I expect the first 1 because I am (for sanities sake) outputting thevalue of i before any operations are done on it.I then expect the value of i on the right of the = to be assigned tothe i on the left of the equals. I expect that to copy it and then theincrement to happen. I do not see why the increment is not done on tehi to the left of the equals. I know this is with primitives whcih passby value but I was expected an outpu...

Question:
When does AOS 4 ship? Last time I checked, it was expected 2 years ago. -- "Mystical references to "society" and its programs to "help" may warm the hearts of the gullible but what it really means is putting more power in the hands of bureaucrats." - Thomas Sowell "Peter Bj�rn Perls�" <spamtrap@REMOVEmacplanet.dk> wrote in message news:2006090519205650073-spamtrap@REMOVEmacplanetdk... > When does AOS 4 ship? > > Last time I checked, it was expected 2 years ago. > Never. On Tue, 5 Sep 2006 19:20:56 +0200, =?ISO-8859-1?Q?Peter...

Question!
I have about 1500 karaoke files on my laptop. They are cdg+mp3 files. They play perfectly with PCDJ-KJ, and Swift ultralite. I have put them onto CDR disks but find they don.t play in a Karaoke machine. Would this item on eBay play them? http://cgi.ebay.ie/SUNFLY-PRO-KARAOKE-MACHINE-PLAYER-2-MICS-CD-G-DVD-... on the disks I get 2 files, one is a CDG for the lyrics, and one is a MP3 for the music. Do these karaoke players play the 2 together or do I have to rewrite them in some other way? If so what sort of drive do I need? Please conside rmy budget is very limited and I am using a Latitude C...

Questions.
Hello, you may recognise my writing from my semi-regular #c64retards notices. Unfortunately this post isn't nearly as light hearted as my previous. Recently there has been a spate of disturbing behaviour that has affected many of us, if it hasn't affected you then feel free to stop reading now. Several recent posts to c.s.c. have been simply nonsensical messages, which seem to be directed towards myself and a few others. I'd like to apologise for the disturbance as those responsible probably never will. Please direct any further questions to uranus@hotmail.com Thankyou, Damian...