Making plots look beautiful
이전 댓글 표시
Hi, I made a plot which displays the condition of cars of a particular brand overtime.
What i would like to do is to make the plot beautiful in apperance for presentation. I tried movmean, smoothing, choosing larger time intervals to avoid the jittering of the data points. But none of them helped me. Can anyone suggest me an idea on how to get this done?
Plot is attached
댓글 수: 6
Luna
2019년 2월 14일
Could you please attach your data? And also what do you mean by look beautiful? Data manipulation or physical appereance like color, linewidth,etc?..
Hari krishnan
2019년 2월 14일
madhan ravi
2019년 2월 14일
Use interp1() with 'spline' method if your only concerned about appearance.
Bjorn Gustavsson
2019년 2월 14일
Why use interp1? Only to produce graphs implying fractions of vehicles are out in traffic?
madhan ravi
2019년 2월 14일
편집: madhan ravi
2019년 2월 14일
I meant if OP is concerned about appearance!
Bjorn Gustavsson
2019년 2월 15일
OP had a discrete counting-number data-set that was sampled at discrete times, and not with discretization noise. That's what the graph should present, in as clear and neat way as possible. Using smoothing or spline interpolation hides that data, even though the curves might look neater.
채택된 답변
추가 답변 (2개)
Bjorn Gustavsson
2019년 2월 14일
You shouldn't manipulate your data that way. Your counting data is statistically "perfect" so you have to treat it as such, you could try to plot the data in different ways. Perhaps using stairs, or plot without the line:
plot(t_obs,car_data,'.','markersize',18)
Or take a look at some examples with bar-graphs...
HTH
댓글 수: 4
Hari krishnan
2019년 2월 14일
Bjorn Gustavsson
2019년 2월 14일
Yes. I understood that. There are things you should allow yourself to do when presenting your data and things not to do. Chosing other type of plots, like stacked bar-graphs, stair-plots etc are absolutely OK, smoothing your type of data - not so much. If you plot only the data-points as points instead of connecting them with line-segments you let the viewers smooth their data in their eyes - that's what they will do more or less automatically.
Luna
2019년 2월 14일
I think bar graph or histogram is not suitable because he wants to see the data change in time.
Bjorn Gustavsson
2019년 2월 15일
What? Bar graphs can do that:
bar(t,car_locations,1,'stacked','edgecolor','none')
atharva aalok
2021년 10월 17일
편집: atharva aalok
2021년 10월 17일
0 개 추천
Please refer the following Plotting Template:
The above is an easy to follow Beginner Friendly template.
The idea is to create Professional Standard Plots within seconds without a steep learning curve and with consistency.
It also offers a wide range of preset Color Codes (please refer the attached image for the Color Palatte)
Sample Plot:

Color Palatte:

카테고리
도움말 센터 및 File Exchange에서 Discrete Data Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
