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!
