From ce4faf18056b33e3d3ca9c66f218d1d213035d52 Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Sun, 29 Jan 2017 13:50:56 +0100 Subject: added consumption histograms --- doc/tex/consumo.tex | 134 ++++++++++++++++++++++++++++++++++++++++++++++++- doc/tex/produzione.tex | 43 ++++++++-------- 2 files changed, 154 insertions(+), 23 deletions(-) diff --git a/doc/tex/consumo.tex b/doc/tex/consumo.tex index 6a57ede..6197532 100644 --- a/doc/tex/consumo.tex +++ b/doc/tex/consumo.tex @@ -27,6 +27,47 @@ Nel 2012 il totale ammontare di energia consumata era di 8'734.5 PJ. Il consumo residenziale è legato al consumo energetico usato per scaldare o raffreddare edifici e acqua di abitazione domestiche, escludendo fabbriche e simili. Il settore residenziale, con una superficie totale di 133 milioni di m\^2 +\marginpar{ + \begin{tikzpicture}% + \begin{axis}[ + % plot type + ybar stacked, + % size + width=2cm, + height=6cm, + bar width = 1.2cm, + % labels + nodes near coords, + every node near coord/.style={ + check for zero/.code={ + \pgfkeys{/pgf/fpu=true} + \pgfmathparse{\pgfplotspointmeta-1.5} + \pgfmathfloatifflags{\pgfmathresult}{-}{ + \pgfkeys{/tikz/coordinate} + }{} + \pgfkeys{/pgf/fpu=false} + }, + check for zero + }, + enlargelimits=0.15, + % axis + scale only axis, + axis lines=middle, + ylabel={$\frac{kWh}{gg\cdot p} $}, + y label style={at={(-.5,1.15)}}, + % X values + xtick = {1}, + xticklabels = {}, + % Y values + ymin = 0, + ] + + \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + (1,32) + }; + \end{axis}% + \end{tikzpicture}% +} di spazio vivibile, occupa il 17\% dell'energia utilizzata in Canada cioè 1'194 PJ divisi tra elettricità e gas naturale. In media in una casa canadese ci sono 2.6 persone, 21 apparecchi elettrodomestici, il 48\% dello spazio occupato è raffreddato @@ -45,7 +86,50 @@ come luci stradali o generatori ausiliari. Questo settore conta più di 13 milio di dipendenti, con una superficie totale di 741 milioni di m\^2 e occupa il 12\% dell'energia utilizzata in canada, cioè 1'069 PJ per la maggior parte divisi tra elettricità e gas naturale. - +\marginpar{ + \begin{tikzpicture}% + \begin{axis}[ + % plot type + ybar stacked, + % size + width=2cm, + height=6cm, + bar width = 1.2cm, + % labels + nodes near coords, + every node near coord/.style={ + check for zero/.code={ + \pgfkeys{/pgf/fpu=true} + \pgfmathparse{\pgfplotspointmeta-1.5} + \pgfmathfloatifflags{\pgfmathresult}{-}{ + \pgfkeys{/tikz/coordinate} + }{} + \pgfkeys{/pgf/fpu=false} + }, + check for zero + }, + enlargelimits=0.15, + % axis + scale only axis, + axis lines=middle, + ylabel={$\frac{kWh}{gg\cdot p} $}, + y label style={at={(-.5,1.15)}}, + % X values + xtick = {1}, + xticklabels = {}, + % Y values + ymin = 0, + ] + + \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + (1,32) + }; + \addplot+[ybar,teal,fill=teal!25] plot coordinates { + (1,23) + }; + \end{axis}% + \end{tikzpicture}% +} \[ \frac{1048.56~PJ}{365~gg\cdot 35.85\cdot 10^6~persone} = \frac{219.29\cdot 10^9~kWh}{365~gg\cdot 35.85\cdot 10^6~persone} @@ -58,9 +142,55 @@ che è tutto ciò che produce beni includendo agricoltura, construzioni, scienze forestali ecc. Il settore è migliorato dal 1990 al 2012 in efficienza del 10\%, rispamiando 3.3 miliardi di dollari. Nel 2012 il settore industriale ha speso 42.4 miliardi di dollari per energia di cui 714 PJ erano di elettricità - \[ \frac{3320.43~PJ}{365~gg\cdot 35.85\cdot 10^6~persone} = \frac{992.42\cdot 10^9~kWh}{365~gg\cdot 35.85\cdot 10^6~persone} = 72.28 ~\frac{kWh}{gg\cdot persona} \] +\marginpar{ + \begin{tikzpicture}% + \begin{axis}[ + % plot type + ybar stacked, + % size + width=2cm, + height=6cm, + bar width = 1.2cm, + % labels + nodes near coords, + every node near coord/.style={ + check for zero/.code={ + \pgfkeys{/pgf/fpu=true} + \pgfmathparse{\pgfplotspointmeta-1.5} + \pgfmathfloatifflags{\pgfmathresult}{-}{ + \pgfkeys{/tikz/coordinate} + }{} + \pgfkeys{/pgf/fpu=false} + }, + check for zero + }, + enlargelimits=0.15, + % axis + scale only axis, + axis lines=middle, + ylabel={$\frac{kWh}{gg\cdot p} $}, + y label style={at={(-.5,1.15)}}, + % X values + xtick = {1}, + xticklabels = {}, + % Y values + ymin = 0, + ] + + \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + (1,32) + }; + \addplot+[ybar,teal,fill=teal!25] plot coordinates { + (1,23) + }; + \addplot+[ybar,blue,fill=blue!25] plot coordinates { + (1,72) + }; + \end{axis}% + \end{tikzpicture}% +} diff --git a/doc/tex/produzione.tex b/doc/tex/produzione.tex index 854fcb5..b062cf7 100644 --- a/doc/tex/produzione.tex +++ b/doc/tex/produzione.tex @@ -57,12 +57,12 @@ elettrica \cite{cansim:electricity}. y label style={at={(-.5,1.15)}}, % X values xtick = {1}, - xticklabels = {Energia}, + xticklabels = {}, % Y values ymin = 0, ] - \addplot+[ybar,gray,fill=gray!25] plot coordinates { + \addplot+[ybar,orange,fill=orange!25] plot coordinates { (1,0.98) }; \end{axis}% @@ -128,15 +128,15 @@ il valore pro capite. y label style={at={(-.5,1.15)}}, % X values xtick = {1}, - xticklabels = {Energia}, + xticklabels = {}, % Y values ymin = 0, ] - \addplot+[ybar,gray,fill=gray!25] plot coordinates { + \addplot+[ybar,orange,fill=orange!25] plot coordinates { (1,0.98) }; - \addplot+[ybar,orange,fill=orange!25] plot coordinates { + \addplot+[ybar,red,fill=red!25] plot coordinates { (1,26) }; \end{axis}% @@ -195,18 +195,18 @@ m\textsuperscript{2} di y label style={at={(-.5,1.15)}}, % X values xtick = {1}, - xticklabels = {Energia}, + xticklabels = {}, % Y values ymin = 0, ] - \addplot+[ybar,gray,fill=gray!25] plot coordinates { + \addplot+[ybar,orange,fill=orange!25] plot coordinates { (1,0.98) }; - \addplot+[ybar,orange,fill=orange!25] plot coordinates { + \addplot+[ybar,red,fill=red!25] plot coordinates { (1,26) }; - \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + \addplot+[ybar,magenta,fill=magenta!25] plot coordinates { (1,13) }; \end{axis}% @@ -295,25 +295,26 @@ giorno pro capite nella maniera seguente: y label style={at={(-.5,1.15)}}, % X values xtick = {1}, - xticklabels = {Energia}, + xticklabels = {}, % Y values ymin = 0, ] - \addplot+[ybar,gray,fill=gray!25] plot coordinates { + \addplot+[ybar,orange,fill=orange!25] plot coordinates { (1,0.00098) }; - \addplot+[ybar,orange,fill=orange!25] plot coordinates { + \addplot+[ybar,red,fill=red!25] plot coordinates { (1,0.026) }; - \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + \addplot+[ybar,magenta,fill=magenta!25] plot coordinates { (1,0.013) }; - \addplot+[ybar,red,fill=red!25] plot coordinates { + \addplot+[ybar,purple,fill=purple!25] plot coordinates { (1,1.3) }; \end{axis}% - \end{tikzpicture}% + \end{tikzpicture} + \\ \footnotesize \`E importante notare che \`e cambiata la scala da Wh a kWh. } @@ -370,24 +371,24 @@ giorno pro capite: y label style={at={(-.5,1.15)}}, % X values xtick = {1}, - xticklabels = {Energia}, + xticklabels = {}, % Y values ymin = 0, ] - \addplot+[ybar,gray,fill=gray!25] plot coordinates { + \addplot+[ybar,orange,fill=orange!25] plot coordinates { (1,0.00098) }; - \addplot+[ybar,orange,fill=orange!25] plot coordinates { + \addplot+[ybar,red,fill=red!25] plot coordinates { (1,0.026) }; - \addplot+[ybar,cyan,fill=cyan!25] plot coordinates { + \addplot+[ybar,magenta,fill=magenta!25] plot coordinates { (1,0.013) }; - \addplot+[ybar,red,fill=red!25] plot coordinates { + \addplot+[ybar,purple,fill=purple!25] plot coordinates { (1,1.3) }; - \addplot+[ybar,blue,fill=blue!25] plot coordinates { + \addplot+[ybar,violet,fill=violet!25] plot coordinates { (1,28.5) }; \end{axis}% -- cgit v1.2.1