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

### bar plot, why some bars are of diiferent width

• Email
• Follow

```hi,

When i plot the bar plot, I find the width of some bars thicker than the other? why is it?

my code is ---
spmax=20
xx(1:spmax,1)=1;
xx(1:spmax,2)=2;
xx(1:spmax,3)=3;
xx(1:spmax,4)=4;
bar(xx,'BarWidth',0.02)

thanks in advance for the support.

regards
AA
```
 0

See related articles to this posting

0 Replies
325 Views

Similar Articles

12/11/2013 7:17:24 PM
page loaded in 79919 ms. (0)

Similar Artilces:

Bar Plot in MATLAB
Hi all, I have a MATLAB Bar Plot question for the group. I'm generating a bar plot using the following command in MATLAB: bar(data); where 'data' is a 3x4 matrix that looks like this: data = [ 3, 7, 5, 2; 4, 3, 2, 9; 6, 6, 1, 4;] Using the bar plot command, this correctly gives me three groups of four bars each. The problem comes in when coloring the bars. The built-in colormaps, and all custom color maps I've created and tried myself, all result in an undesirable coloring behavior. I would like ALL four bars in the first group to be color A, ALL four bars in the second ...

Creating a 3d plot consisting of a set of bar plots
Dear All, I think my question might be standard, but I am unable to find the answer. I have made a fairly intricate bar plot and would like to make several variations on this and plot them all in 3d. Say I have 3 bar plots. I would like to put these together in a 3d plot so plot 1 lies in a y-z plane, located at x=0 plot 2 lies in a y-z plane, located at x=5 plot 3 lies in a y-z plane, located at x=10 So I'm sort of looking for three walls, one in front of the other, each wall is one of my bar plots. Ideally, I'd like to create each bar plot separately, then giv...

Color bar plots
Hi. I have a problem with coloring of bars. So, I have a bar plot, like this bar(rx,ry) And I want to color it, which works fine if I do this bar(rx,ry,'g') for example The problem arises when I want to plot to bar plots, in the same figure. As soon as I issue the "hold on" command, the coloring no longer works, and I just get black bars. My code is something like this figure(1) axis([0,80,0,200]) hold on bar(rx1,ry1,'r') bar(rx2,ry2,'g') Does anyone have an easy way to do this? ...

bar plot using colormap
Very simple problem - not sure what I'm doing wrong... I want to make each bar a different color using the colormap bone. Here is my code so far: X = [0.19 0.18 0.12 0.04 0.19 0.12 0.12]; b = bar(X); p = bone(7); ch = get(b,'children'); set(ch(1),'Facecolor', p(1,:)) set(ch(2),'Facecolor', p(2,:)) figure it out bh = bar(X); ch=get(bh,'children'); cd=repmat(1:numel(X),5,1); cd=[cd(:);nan]; set(ch,'facevertexcdata',cd); colormap(bone); ...

Creating Polar Bar Plot
Hi all, I have a file containing air data values like, direction, speed, humidity etc. at different levels. I want to plot speed parameter with corresponding direction with values. How can i do that. ...

bar plot with different filling-patterns
Hi, the following simple code x1 = [5, 6] y1 = [3, 2] bar([1,2], [x1; y1]) produces a bar plot where two of the bars have a color (let's say red) and the two other bars have another color (let's say blue). I'd like to know whether it's possible to plot the bars not simply with a different FaceColor but with a different filling pattern. So, for example, the blue bars filled with vertical lines and the red bars filled with horizontal lines. Please, note, I'm not talking about the borders of the bars. Any help will be appreciated. Thanks and regards Francesco ...

odd plot anomaly--white bar
Inside my contour plot appears a white bar, stretching from the far right of the plot to about three-quarters of the plot to the left. It's small, only about a quarter-inch high on a 4.5-inch plot. The left end is pointed, so it looks like a wooden stake lying on its side. It's inside the plot itself, not just in the figure window, and it appears whenever I plot my data; I know it's not the data, because others don't have this problem with it. Anyone have any idea what could be causing it? ...

3D bar plot and y-axis labelling
Dear all, I have a 3D plot like this: http://www.lis.ic.unicamp.br/~jmontoya/bar.png In the Y-axis of the plot, each group of three bars refer to the same parameters: x1, x2, x3. I would like to have a spacing in the y-axis for each group of three bars, so that it becomes more clear that those bars are referring to the same parameters. At the same time, I would like to put a label on the Y-axis to each of group of three bars. For example, if we're on the y-axis the following layout would be desired: x1 x2 x3 x1 x2 x3 x1 x2 x3 grid1 grid2 grid3 Any suggest...

.each do |foo, bar| what does bar do?
"code_words.each do |real, code| idea.gsub!( real, code ) end You see the each method? The each method is all over in Ruby. It's available for Arrays, Hashes, even Strings. Here, our code_words dictionary is kept in a Hash. This each method will hurry through all the pairs of the Hash, one dangerous word matched with its code word, handing each pair to the gsub! method for the actual replacement." from page 33 of whys-poignant-guide-to-ruby.pdf Is this similar to nested for statements? I don't think so. In the first line, why are both "real" and "code&quo...

Error bars not located over correct bar in barplot
Hi all, I am trying to create a bar plot with 4 bars each with their own error bar. I have managed to plot the barplot and get the error bars to show up, but I cannot figure out how to get them to position themselves over their associated bar. Any ideas where I'm going wrong? Thanks, Meredith p19 = barplot(daily_avg_netK, nbars = 4, index = 0) p20 = barplot(daily_avg_netL, /overplot, nbars = 4, index = 1) p21 = barplot(daily_avg_netQn, /overplot, nbars =4, index = 2) p22 = barplot(daily_avg_Qcalc, /overplot, nbars = 4, index = 3) p23 = errorplot(daily_avg_netK, daily_stdev_netK,...

foo-bar = 'foo-bar' 3123
I'm new to Prolog and had a rule failing today when I thought it should pass because in SWI-Prolog foo-bar and 'foo-bar' do not unify. foo and 'foo', however, do unify. Now that I know there is a difference, I can avoid the problem. I scoured the reference manual, but didn't find an explanation. Out of curiosity, can anyone explain to me why this is happening? Here's the output of a sample session in case that helps: ?- foo = 'foo'. Yes ?- foo-bar = 'foo-bar'. No Thanks, Michael On Dec 19, 5:55=A0pm, Michael Hendricks <mnd...@gmail.com>...

only add a scroll bar when the window is minimized and scroll bar is needed
Hi! Is there anyway I can add a horizontal scroll bar only when the window get's minimized? This is for tcl/tk 8.3. Thanks!! Meg mulkey_mouse@cox.net wrote: > Hi! > > Is there anyway I can add a horizontal scroll bar only when the window > get's minimized? This is for tcl/tk 8.3. I can't tell from your description, but I *think* you are looking for the autoscroll package in Tklib. -- +--------------------------------+---------------------------------------+ | Gerald W. Lester | |"The man who fights fo...

Has anyone found a way to hide the toolbar, address bar, and menu in the current web browser window? I cannot window.open as this method has been defeatured due to security in IE. Works in Firefox within domain though! I am showing an image and would ideally like to show it full-screen. Thanks! timjowers "Tim" <timjowers@yahoo.com> wrote in message news:1106068594.026389.316230@f14g2000cwb.googlegroups.com... > > Has anyone found a way to hide the toolbar, address bar, and menu in > the current web browser window? I cannot window.open as this method > has >...

Regex combining /(foo|bar)/ slower than using foreach (/foo/,/bar/) ???
I've got a problem with the perl regex compiler. It seems that compliation of combined regexes ( or alternation whatever you call it ) is not optimized. Using a /(foo|bar)/ regex on strings is slower than using a foreach loop doing the matching one after another. I've written a testprogramm and looked at the perl source to find out why. Now I know. It seems that DFA won't get optimised for the alternation. As I have no time and knowledge and skill for optimising the perlregex compiler from scratch, what can I do. Programming such foreach loops gives me headaches - it such 'a...

Custom Tool Bar.. remove "tool bar options"
Hello I am trying to make some custom menus, popups and toolbars. But, at the end of my toolbar I have a down pointing arrow that opens the Toolbar Options dialog box. Can anyone advise on how to remove this? I have tried various combinations on the Toolbar Properties including un checking "allow customization" but nothing I have tried seems to work. Thanks for your time Ralph ...

(pathname "/tmp/foo/bar/") vs (pathname "/tmp/foo/bar")
Among all the various wrinkles in interpretation and implementation choices around pathnames, all the Unix-based Common Lisp's I've tested seem to agree that: (pathname-directory "/tmp/foo/bar") ==> (:ABSOLUTE "tmp" "foo") while: (pathname-directory "/tmp/foo/bar/") ==> (:ABSOLUTE "tmp" "foo" "bar") I.e. the trailing '/' on the namestring controls whether the last element goes into the directory component of the pathname. However I have not tested every implementation. Does anyone know of a Uni...

1.Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed"
Enter space bar for field names and save the field.The field shoud not get saved and an alert should be there as"Space bars are not allowed" Add a field without giving any name and save the field.The field should not get saved,and an alert should be there as "Field name is mandatory" Sound wrote on 28 Sep 2006 in comp.lang.javascript: > Enter space bar for field names and save the field.The field shoud not > get saved and an alert should be there as"Space bars are not allowed" > > Add a field without giving any name and save the field.Th...

Graph bar
Hi, I have the following problem. I would create in matlab a graph bar as in image attached: http://www66.zippyshare.com/v/81546643/file.html The problem is the following: the value are not in crescent order but are mix. How can I do to slve my problem.? Thanks to all. ...

Progress Bars?
Hi. What's the name of the control, that has a single short bar goes back and forth as opposed to one way only? Thanks, Michael >From my understanding you are trying to make a progress bar that doesn't actually say the progress but is more of a graphical image that some what resembles the game pong. You would need an animation, see component: danim.dll Michael wrote: > Hi. > > What's the name of the control, that has a single short bar goes back and > forth as opposed to one way only? > > Thanks, > > Michael ...

Explorer Bar
How can I create the Explorer Bar found in Windows XP. Are there any sample projects anywhere. I created one manually with use of labels, picture boxes, images and so on. I created the mixed header for each section by drawing vertical lines in a loop, changing the colour as I went. All the images and hyperlink labels and so on were in control arrays that were being manouvered in code as they were being added to the form. It was a fair amount of work, but I'm a perfectionist and couldn't find a free ready-made sample that was just right. Even though mine looks great, there are som...