graph from a dataset

1 view (last 30 days)
Neesha
Neesha on 10 Dec 2015
Commented: Neesha on 14 Jan 2016
Hi ,
I have data as follow for about 58 rows.
Name Area lotNum Type Month1 Month2 Month3.... MonthN
Rest1 biz 123 south 5 5 7 .... 3
Rest1 nonBiz 123 south 2 11 8 ..... 1
Rest1 biz 456 south 11 9 3 ..... 24
rest2 biz 123 south 9 3 23 ..... 21
rest3 biz 789 south 23 3 4 ...... 1
I want to draw graph for each row for months on x-axis and value on y-axis. Also is it possible to have this graph saved in a file. ?
Thanks.
  6 Comments
Neesha
Neesha on 10 Dec 2015
So i figured Xclicks and xTicks. Just cannot get them to align. Since my N is 192, how do i get months only which aligns to Xticks i decide
Neesha
Neesha on 10 Dec 2015
Edited: Neesha on 10 Dec 2015
After my graph is created i do following
arrayX = [10, 20, 30, 40, 50, 60, 70, 80, 90, 100, 110, 120, 130, 140, 150, 160, 170, 180, 190]; % I have 192 months
for i = 1:xSize
if mod(i, 10) == 0
mLabel(j) = monLabel(i);
j = j + 1;
end
end
set(gca,'XTick',arrayX]);
set(gca,'XTickLabel', mLabel)
this gets me label positioned at every 10 months so the labels donot crowd on each other and can read easily. I would love it to be done little less hardcorded then it is right now

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 10 Dec 2015
  1 Comment
Neesha
Neesha on 14 Jan 2016
how is it different from saveas()

Sign in to comment.

Categories

Find more on 2-D and 3-D Plots in Help Center and File Exchange

Tags

No tags entered yet.

Community Treasure Hunt

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

Start Hunting!