Electromagnetic spectrum

electromagnetic_spectrum

Edit and compile if you like:

% Author: Izaak Neutelings (May 2020)
\documentclass[border=3pt,tikz]{standalone}
\tikzset{>=latex} % for LaTeX arrow head
\usepackage{ifthen}
\usepackage{xcolor}
\usepackage{physics}
\usepackage{siunitx}
\colorlet{wavecol}{orange!35!black}
\colorlet{freqcol}{green!25!black}
\colorlet{enercol}{blue!35!black}
\pgfdeclareverticalshading{rainbow}{100bp}{
color(0bp)=(red); color(25bp)=(red); color(35bp)=(yellow);
color(45bp)=(green); color(55bp)=(cyan); color(65bp)=(blue);
color(75bp)=(violet); color(100bp)=(violet)
}
\begin{document}
% ELECTROMAGNETIC SPECTRUM
\begin{tikzpicture}[xscale=1]
\def\h{1}
\def\radio{-4}
\def\micro{0}
\def\IR{3}
\def\red{6.10} % log(700e-9) = -6.15490196
\def\blue{6.40} % log(400e-9) = -6.39794001
\def\UV{6.40}
\def\Xray{8}
\def\gamm{11}
\def\last{12}
\def\radiof{-5}
\def\dx{0.6}
\def\yE{-1.1*\h}
\def\tick#1#2#3{\draw[thick,#2] (#1+.08) --++ (0,-.16) node[below=-2pt,scale=1] {\strut #3};}
\def\ticka#1#2#3{\draw[thick,#2] (#1+.08) --++ (0,-.16) node[above=2pt,scale=1] {\strut #3};}
% MIDDLE
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Click to download: electromagnetic_spectrum.texelectromagnetic_spectrum.pdf
Open in Overleaf: electromagnetic_spectrum.tex

2 Replies to “Electromagnetic spectrum”

    1. Do you have some actual constructive feedback?

      If the issue is the width of the figure when you blindly copy-paste the TikZ code into your text, all you need to do is add something like scale=0.7,transform shape to the options to \begin{tikzpicture}.

      I never run into these issue, because I typically compile TikZ figures separately from a standalone LaTeX file and load them as (multipage) PDFs to keep the code clean and compilation fast.

Leave a Reply

Your email address will not be published.