tikzdraw/risposta_coni.tex

78 lines
3.4 KiB
TeX
Raw Normal View History

2019-05-09 11:25:56 +02:00
\documentclass{standalone}
\usepackage{tikz}
\usetikzlibrary{backgrounds}
\usetikzlibrary{plotmarks}
\usepackage{xcolor}
%
\usepackage{mathptmx}
\usepackage{fontspec}
\setmainfont{Montserrat}
%
%source https://tex.stackexchange.com/questions/11368/bell-curve-gaussian-function-normal-distribution-in-tikz-pgf
\usepackage{pgfplots}
\pgfplotsset{width=7cm,compat=1.8}
\pgfmathdeclarefunction{gauss}{2}{%
\pgfmathparse{1/(#2*sqrt(2*pi))*exp(-((x-#1)^2)/(2*#2^2))}%
}
%
\title{Risposta relativa dei coni}
\begin{document}
\begin{tikzpicture}
%
\begin{scope}[xshift=-0.53\linewidth,yshift=-0.3\linewidth]
\begin{axis}[every axis plot post/.append style={mark=none,domain=-2:3,samples=50,smooth}, height=8.7cm, width=16.2cm, axis x line*=bottom, axis y line*=left, xtick=\empty, ytick=\empty, enlargelimits=upper]
\addplot[ultra thick, color=blue,yshift=0.01\linewidth] {gauss(-1.28,0.6)};
\addplot[ultra thick, color=green,yshift=0.07\linewidth] {gauss(0.65,0.69)};
\addplot[ultra thick, color=red,yshift=0.07\linewidth] {gauss(1.25,0.69)};
\end{axis}
\end{scope}
%
\draw (-6.4,-3.6) -- (-6.4,3.5) node [midway, above, sloped, yshift=0.17\linewidth] (TextNode) {\fontsize{17}{18}\selectfont Risposta relativa dei coni};
\draw[ultra thick] (-6.4,3.5) -- (-6.4,-3.6) -- (8.3,-3.6);
%
\foreach \x in {0,2.5,5,7.5,10,12.5}
{\draw[ultra thick] ({-5.8 + \x},-3.6) -- ({-5.8 + \x},-3.9);}
\foreach \y in {3,1.7,0.4,-0.9,-2.2}
{\draw[ultra thick] (-6.7,\y) -- (-6.4,\y);}
%etichette asse x
\node at (-5.8,-4.3) () {\fontsize{20}{21}\selectfont $400$};
\node at (-3.3,-4.3) () {\fontsize{20}{21}\selectfont $450$};
\node at (-0.8,-4.3) () {\fontsize{20}{21}\selectfont $500$};
\node at (1.7,-4.3) () {\fontsize{20}{21}\selectfont $550$};
\node at (4.2,-4.3) () {\fontsize{20}{21}\selectfont $600$};
\node at (6.7,-4.3) () {\fontsize{20}{21}\selectfont $650$};
%
\node at (0,-5.5) () {\fontsize{20}{21}\selectfont Lunghezza d'onda $(nm = 10^{-9} m)$};
\draw[<->,dashed,ultra thick] (-6.4,-6.5) -- (8.3,-6.5) node [below,midway] (TextNode) {\fontsize{20}{21}\selectfont Spettro visibile};
\node at (-6.4,-7) () {\fontsize{20}{21}\selectfont $380$};
\node at (8.3,-7) () {\fontsize{20}{21}\selectfont $680$};
%etichette asse y
\node at (-7.6,3) () {\fontsize{20}{21}\selectfont $100 \%$};
\node at (-7.6,1.7) () {\fontsize{20}{21}\selectfont $80 \%$};
\node at (-7.6,0.4) () {\fontsize{20}{21}\selectfont $60 \%$};
\node at (-7.6,-0.9) () {\fontsize{20}{21}\selectfont $40 \%$};
\node at (-7.6,-2.2) () {\fontsize{20}{21}\selectfont $20 \%$};
%
\draw[dashed,color=blue!60!white] (-0.8,-3.6) -- (-0.8,5.1);
\node at (-0.8,5.7) () {\fontsize{15}{16}\selectfont azzurro};
%
\draw[dashed,color=orange] (4.2,-3.6) -- (4.2,5.1);
\node at (4.2,5.7) () {\fontsize{15}{16}\selectfont arancione};
%
\node at (-4.5,4.1) () {\fontsize{17}{18}\selectfont Coni};
\node at (-4.5,3.5) () {\fontsize{17}{18}\selectfont B};
\node at (0.4,4.1) () {\fontsize{17}{18}\selectfont Coni};
\node at (0.4,3.5) () {\fontsize{17}{18}\selectfont G};
\node at (2.6,4.1) () {\fontsize{17}{18}\selectfont Coni};
\node at (2.6,3.5) () {\fontsize{17}{18}\selectfont R};
%
\foreach \y in {-3.1,-1.3,1.3}
{\draw[fill=black] (-0.8,\y) circle (0.2cm);}
%
\foreach \y in {-3.5,-2,0.4}
{\draw[fill=black] (4.2,\y) circle (0.2cm);}
%
\end{tikzpicture}
%
\end{document}