# How do I create a graph similar to that of the example below?

조회 수: 1 (최근 30일)
Devin Perera . 2022년 7월 14일
편집: dpb . 2022년 7월 17일

댓글을 달려면 로그인하십시오.

### 답변 (1개)

Jonas 2022년 7월 14일
편집: Jonas 님. 2022년 7월 14일
you could do like this
loglog([ 10^2 10^2 10^4 10^4 10^2],[ 10^4 10^6 10^6 10^4 10^4]);
hold on;
loglog([ 1 10^2 10^4 10^4],[ 10^2 10^2 10^1 1]);
loglog(10.^([5 6 7 8 5]),[ 10^3 10^5 10^5 10^4 10^3]);
grid on;
axis([1 10^8 1 10^8])
##### 댓글 수: 5이전 댓글 4개 표시이전 댓글 4개 숨기기
dpb 2022년 7월 16일
편집: dpb 님. 2022년 7월 17일
As @Jonas shows, you can just plot points in sequential order to draw the lines -- each line will be a vector of x,y points from your data.
The perfect rectangle can be done with the rectangle function, the other areas could also be done with patch with no fill...
It'll perhaps be somewhat tedious, but not particularly difficult.
NB: You ca put all your data into single X,Y arrays by column -- if there aren't the same number of points to define each line, fill the remainder of the column to make the rectangular array with NaN; plot() will just silently ignore those entries.
This will let you get by with one call to plot() rather than having a long string of duplicated code with a bunch of named variables.
Create a matching array of labels to use for the indentifying text.

댓글을 달려면 로그인하십시오.

### 카테고리

Help CenterFile Exchange에서 Discrete Data Plots에 대해 자세히 알아보기

### Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by