본문 바로가기

xticks2

Matlab Graph Axis Tick | Plot Advanced Edit1 Matlab Graph Axis Tick | Plot Advanced Edit1 When you draw a graph, the x-axis value or y-axis value is sometimes expressed in a way that you don't like. For example, suppose you have the following graph. The x-axis data is marked 'x10^4.' It is not easy to understand them at a glance. Similarly, the y-axis is also marked 'x10^-3' and is not satisfactory. Therefore, we want to attach k to the x-.. 2020. 9. 24.
매트랩 그래프 축 눈금 편집하기 | plot 고급 편집1 매트랩 그래프 축 눈금 편집하기 | plot 고급 편집1 그래프를 그리다 보면 x축 값 또는 y축 값이 맘에 들지 않는 표기 방식으로 나오는 경우가 있다. 예를 들어 다음과 같은 그래프가 있다고 하자. x축 데이터가 'x10^4'으로 표기되어 한 눈에 들어오지 않는다. 마찬가지로 y축도 'x10^-3'으로 표기되어 마음에 들지 않는다. 따라서 x축 눈금 값에 k를 붙이고 y축 자체는 단위를 mNm로 바꿔 깔끔하게 표현하고자 한다. 방법은 다음과 같다. 아래 코드를 plot 함수 뒤에 붙이기만 하면 된다. xticks([0 10000 20000 30000 40000 50000 60000]) xticklabels({'0','10k','20k','30k','40k','50k','60k'}) yticks([0 .. 2020. 8. 4.
반응형