Making plots look beautiful
Show older comments
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 Comments
Luna
on 14 Feb 2019
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
on 14 Feb 2019
madhan ravi
on 14 Feb 2019
Use interp1() with 'spline' method if your only concerned about appearance.
Bjorn Gustavsson
on 14 Feb 2019
Why use interp1? Only to produce graphs implying fractions of vehicles are out in traffic?
madhan ravi
on 14 Feb 2019
Edited: madhan ravi
on 14 Feb 2019
I meant if OP is concerned about appearance!
Bjorn Gustavsson
on 15 Feb 2019
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.
Accepted Answer
More Answers (2)
Bjorn Gustavsson
on 14 Feb 2019
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 Comments
Hari krishnan
on 14 Feb 2019
Bjorn Gustavsson
on 14 Feb 2019
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
on 14 Feb 2019
I think bar graph or histogram is not suitable because he wants to see the data change in time.
Bjorn Gustavsson
on 15 Feb 2019
What? Bar graphs can do that:
bar(t,car_locations,1,'stacked','edgecolor','none')
atharva aalok
on 17 Oct 2021
Edited: atharva aalok
on 17 Oct 2021
0 votes
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:

Categories
Find more on Discrete Data Plots in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!