Spaces:
Sleeping
Sleeping
File size: 3,630 Bytes
d2d624a |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 |
\documentclass[tikz]{standalone}
\usepackage{pgfplots}
\usepackage{pgfplotstable}
\pgfplotsset{compat=1.17}
\begin{document}
% Load the dataset
\pgfplotstableread[col sep=comma]{data/processed/v2_merged_selected_features_with_missing.csv}\datatable
\begin{tikzpicture}
% Main title at the top
\node[align=center] at (7, 3.75) {\textbf{Distributions of Environmental Variables}};
% First row of plots
\begin{axis}[
at={(0,0)},
width=5.5cm,
xlabel=PM$_{2.5}$ ($\mu g /m^3$),
tick label style={font=\fontsize{8}{8}\selectfont},
ylabel=Frequency,
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=1] {\datatable};
\end{axis}
\begin{axis}[
at={(5cm,0)},
width=5.5cm,
tick label style={font=\fontsize{8}{8}\selectfont},
xlabel=PM$_{10}$ ($\mu g /m^3$),
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=2] {\datatable};
\end{axis}
\begin{axis}[
at={(10cm,0)},
width=5.5cm,
tick label style={font=\fontsize{8}{8}\selectfont},
xlabel=O$_{3}$ ($\mu g /m^3$),
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=3] {\datatable};
\end{axis}
% Second row of plots
\begin{axis}[
at={(0,-5cm)},
width=5.5cm,
xlabel=NO$_{2}$ ($\mu g /m^3$),
tick label style={font=\fontsize{8}{8}\selectfont},
ylabel=Frequency,
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=4] {\datatable};
\end{axis}
\begin{axis}[
at={(5cm,-5cm)},
width=5.5cm,
xlabel=Temperature (°C),
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=5] {\datatable};
\end{axis}
\begin{axis}[
at={(10cm,-5cm)},
width=5.5cm,
xlabel=Humidity (\%),
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=6] {\datatable};
\end{axis}
% Third row of plots
\begin{axis}[
at={(0,-10cm)},
width=5.5cm,
xlabel=Visibility ($km$),
tick label style={font=\fontsize{8}{8}\selectfont},
ylabel=Frequency,
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=7] {\datatable};
\end{axis}
\begin{axis}[
at={(5cm,-10cm)},
width=5.5cm,
xlabel=Solar Radiation ($W/m^2$),
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=8] {\datatable};
\end{axis}
\begin{axis}[
at={(10cm,-10cm)},
width=5.5cm,
xlabel=Precipitation ($mm$),
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=9] {\datatable};
\end{axis}
\begin{axis}[
at={(2cm,-15cm)},
width=5.5cm,
xlabel=Windspeed ($km/h$),
ylabel=Frequency,
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=10] {\datatable};
\end{axis}
\begin{axis}[
at={(8cm,-15cm)},
width=5.5cm,
xlabel=Wind Direction (degrees),
tick label style={font=\fontsize{8}{8}\selectfont},
ybar=0pt, bar width=1,
]
\addplot+[fill=cyan,
fill opacity=0.5,
hist={bins=20}
] table [y index=11] {\datatable};
\end{axis}
\end{tikzpicture}
\end{document}
|