フィルターのクリア

How to use two data unit length in the plot function?

2 ビュー (過去 30 日間)
Hao Zhang
Hao Zhang 2021 年 10 月 28 日
編集済み: Ive J 2021 年 10 月 28 日
I want to use two data unit length in the x axis for the function plot.
For example, the x vlaues of my data is x=[0:0.1:1 2:1:100], the y value of my data is from some function y=f(x).
You can see the first section of my data is sampled with small x intervals from 0 to 1. If I use plot(x,y), the first section of the data only consists of a very small portion of my plot.
I want to make the data from 0 to 1 appears to take more space of my plot, for example I want to make the data from 0 to 1 appears to have the same length in the x axis as the data from 2 to 100 so I can see details. Note that I cannot drop the data from 2 to 100, I have to plot all range but with two different data unit length, how should I do that?

回答 (1 件)

Ive J
Ive J 2021 年 10 月 28 日
編集済み: Ive J 2021 年 10 月 28 日
Either transform your data (e.g. log transformation), or break X-/Y-axes. There are several FEX already out there:
mathworks.com/matlabcentral/fileexchange/?utf8=✓&term=break+axis
https://mathworks.com/matlabcentral/fileexchange/3668-breakaxis

カテゴリ

Help Center および File ExchangeVisual Exploration についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by