How can I generate equal visual witdh bars with bar graph and log absciss scale ?
10 次查看(过去 30 天)
显示 更早的评论
Hello everyone,
My problem is that I want to obtain a graph similar to this one (consider the green bars only) with Matlab.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225421/image.png)
The things is that with a logarithmic absciss scale with Matlab, I obtain:
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/225422/image.png)
Is there a way to generate bars with a width that increase when this bar is located on the right of the absciss scale in order to hev "visualy" the same width for each bar ?
Regards
N.B : I put my code as an attached file but it is quite simple.
0 个评论
采纳的回答
更多回答(1 个)
Roman Katzer
2024-2-20
I used the stairs plot function with specified band edges. Code is attached.
What I don't know is why the fractional spectra from poctave would be different, depending on whether I calculate them from time signal os the time signal's PSD. If anyone has an idea, please help.
![noise spectra](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1621958/noise%20spectra.png)
![sine spectra](https://www.mathworks.com/matlabcentral/answers/uploaded_files/1621963/sine%20spectra.png)
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Discrete Data Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!