0

bar3 plot with where size of every steps manually defined

In the attached bar3 plot, in 'kanal 1' and 'kanal 2' axis values are not equidistant. But in plot all the bar are same square sized only height is different. Is there and command to change the size for better representation? A sample code is given here:

bar3(rand(3,4))
set(gca,'XTickLabel',[10 20 30 40])
set(gca,'YTickLabel',[100 200 300])

I just need non square sized bar. Bar size need to be changed according to axis label value. If there any other plotting suggestions, it will be warmly welcomed. Thanks

Ander Biguri
  • 35,140
  • 11
  • 74
  • 120
kasraful
  • 59
  • 8
  • Your sample code does not reproduce the effect you want. You are not giving `x` and `y` coordinates – Ander Biguri Mar 23 '18 at 11:51
  • Is this what you want?: https://stackoverflow.com/questions/28991376/how-to-set-x-and-y-values-when-using-bar3-in-matlab – Ander Biguri Mar 23 '18 at 11:54
  • 1
    3d bar plots are horrible to capture this effect. use `uimagesc` from the fex... https://www.mathworks.com/matlabcentral/fileexchange/11368-uimage-uimagesc – bla Mar 23 '18 at 17:09
  • @AnderBiguri I know my sample code does not reproduce my displayed image. It just an example. Btw, it you look at my example code then you will find that X-axis has 10 difference between 2 adjacent point while in Y-axis it is 100. But still the bar plot is square. But I want those bar in y-axis 10 times larger than X-axis. – kasraful Mar 25 '18 at 19:56
  • @AnderBiguri Your 2nd answer link is not what i wanted. Thats part is already done if you carefully look at my figure. Thanks – kasraful Mar 25 '18 at 20:02
  • @bla This is not what I wanted. Bcz that function mentioned that ". X and Y may be unevenly spaced vectors, but must be increasing.".. but in my case it can be increasing or decreasing. If any other types plot suggestion then I will be grateful. Thanks – kasraful Mar 25 '18 at 20:06

0 Answers0