Assignment #3
Assignment #3
Assignment #3
Overview:
This assignment asks you to plot figures of acceptable quality for scientific publications.
Goals:
1- To train you on plotting high quality figures with acceptable scale and resolution.
2- To help you get familiar with plotting tools, either using scripts (Matlab, Python, R, etc.)
or spreadsheets (Excel, OriginLab, Prism, etc.).
Grade:
1/7 the total coursework grade (60 points).
Grading will be based on quality and completeness of figures. Pay attention to all figure details,
including labels, ticks, legends, axes, curves, markers, etc.
What to do:
Attached is an MS Excel file containing minute observations of various solar and meteorological
parameters. The data is provided for four different days in the year (each in a separate sheet).
You are required to produce the following figures and tables from the provided data.
1- Add a table showing the following quantitative statistics for each of the nine measured
parameters (Effective sky temperature, …, wind direction) based on the whole dataset
(considering all four days as a single dataset): mean, median, standard deviation,
maximum, minimum.
2- Plot the variations of direct normal irradiance, global horizontal irradiance, and diffuse
horizontal irradiance during the fourth day (December, 21) in a single figure (same
vertical axis). In the same figure, add an inset showing the variations of the three
parameters during the period from 11:00 am to 1:00 pm.
3- Plot the variations of ambient air temperature during the four days (each day in a
separate subplot of the same figure) and show the error bars of the measurements,
knowing that the uncertainty in temperature measurements is ±1.0 °C. Show the error
bars only at the head of each hour (i.e. 00:00, 01:00, …, 23:00).
4- Plot the variations of relative humidity and barometric pressure during the third day
(September, 21) in the same figure, but using two different vertical axes (double y plot).
5- Plot the wind rose of the first day (March, 21).
6- Add a group bar plot showing the average sky temperatures of the four days at each of
the 24 hours. At each hour, there should be four bars for the four days.
7- Plot a histogram of the diffuse fraction during the four days (considering all four days as
a single dataset). The diffuse fraction (DF) is the ratio between the diffuse horizontal
irradiance and the global horizontal irradiance (DF=DHI/GHI). Its value ranges between
0.0 and 1.1. If the ratio is higher than 1.1 at any time step, use linear interpolation to re-
Assignment #3
estimate it from the previous and following observations. Ignore NAN values (i.e. data
points when both GHI and DHI equal 0) and INF values (when DHI>0 and GHI=0).
8- Add a scatter plot showing the relation between the parameters (GHI-DHI) and
(DNI*cos(θ)), where GHI is the global horizontal irradiance, DHI is the diffuse horizontal
irradiance, DNI is the direct normal irradiance, and θ is the incidence angle. Use one
figure with four subplots, each for a separate day. Show a reference line with a slope of
45° crossing the origin point. Show the data points only when the values of the two
parameters are higher than 0 and lower than 1500 W/m2. On each of the subplots, show
the value of the coefficient of determination (R2). Make a quick Google search to find its
formula.
9- Plot four pie charts of the four days in the same figure. Each pie chart is to show the
percentage of the day length where the ambient air temperature (𝑇𝑎𝑚𝑏 ) is in the following
ranges: 0 ≤ 𝑇𝑎𝑚𝑏 < 5; 5 ≤ 𝑇𝑎𝑚𝑏 < 10; 10 ≤ 𝑇𝑎𝑚𝑏 < 15; 15 ≤ 𝑇𝑎𝑚𝑏 < 20; 20 ≤ 𝑇𝑎𝑚𝑏 < 25;
25 ≤ 𝑇𝑎𝑚𝑏 < 30; 30 ≤ 𝑇𝑎𝑚𝑏 < 35; 35 ≤ 𝑇𝑎𝑚𝑏 < 40. Use a single legend for all subplots.
10- Use Web Plot Digitizer (https://apps.automeris.io/wpd/) or any similar tool to extract
the data of the following figure (available in high resolution at
https://www.sciencedirect.com/science/article/pii/S0960148120306984). Use the
extracted data to replot the same figure but with solid, dash, and dotted lines to
distinguish the three oil types, instead of black, red, and blue colors, respectively.
Assignment #3
Instructions:
1- It’s your job to pick a suitable style for each of the mentioned figures, and their
components.
2- Your figures MUST be in high quality and resolution (minimum of 300 dpi). Otherwise,
you’ll receive a zero grade.
3- The assignment should be only 16 pages: 1) title page, 2-12) the required table and figures,
each in a new paper, 13) full screenshot of one working file on the tool you used for
plotting (Matlab, Excel, Originlab, etc.), 14) full screenshot of the tool you used for
digitizing the figure in point #10 (e.g. Web Plot Digitizer), 15) full screenshot of the tool
you used for plotting the schematic in point #11 (e.g. Visio). Each of the three screenshots
must show your script (e.g. Matlab), plot side by side with the data (e.g. Excel), draft of
your schematic (e.g. Visio), and captured data (e.g. in Web Plot Digitizer). This is to prove
that you have done those exercises yourself. 16) a screenshot of the properties window of
the first figure, showing it has a width of 8000 pixels and a resolution of at least 300 dpi
(as in the figure below). Use Photoshop, Gimp, Inkscape, Krita, or any other image
manipulation tool to crop the white background and scale the image to the required size.
Assignment #3