필터 지우기
필터 지우기

Words as x axis?

조회 수: 45 (최근 30일)
Monica Rochnowski
Monica Rochnowski 2020년 2월 1일
댓글: Monica Rochnowski 2020년 2월 1일
Hello, I'm using MatLab for my cs class in college, it's an intro class and I know close to nothing about coding.
I would like to make a graph of x and y values, I understand that part, with numbers though.
My x values are i guess words instead of numbers, how do I represent that?
Thank you!

채택된 답변

BN
BN 2020년 2월 1일
편집: BN 2020년 2월 1일
First, you can create Words
Words = {'word_one'; 'word_two'; 'word_three'};
then plot what ever you want, and after plot part:
set(gca,'xtick',[1:3],'xticklabel',Words)
Further, you can read Label x-axis.
If you want to rotate Words after doing this, as I can predict, it you can read this documentation: xtickangle
  댓글 수: 4
Star Strider
Star Strider 2020년 2월 1일
No worries!
Monica Rochnowski
Monica Rochnowski 2020년 2월 1일
You guys are both awesome! Thank you so much!

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

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Axis Labels에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by