Single line plot with fixed axis
1 Ansicht (letzte 30 Tage)
Ältere Kommentare anzeigen
Dear Matlab helper,
I wonder if there is any easy way to make the following plot with matlab? It is na line plot with fixed x and y axis. x axis need to be scientific and logarithmic scale. The line has intervals as well (Y1 and Y2). I was trying with fixing the axis scales but not anywhere close to make it ^_^; Please see the attached figure to see what i wanted to make!
For axis scale i used the following code but it is as i mentioned far from the figure. ![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/529804/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/529804/image.png)
x=0.00000008:0.00000001:0.00000003;
y=0:50:300
bar(0.00000045, 200)
0 Kommentare
Akzeptierte Antwort
Rik
am 24 Feb. 2021
Every axes object has an XScale property you can set to 'log' to get the desired plot. You can use the normal plotting tools (e.g. plot and errorbar) after or before setting that. You can simply use
set(gca,'XScale','log')
6 Kommentare
Rik
am 17 Mär. 2021
I formatted your code for you (which you can do yourself) and ran it (which you probably currently can't). As you can see, there is no issue on R2021a. Which release are you using?
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Graphics Object Programming finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!