summaryrefslogtreecommitdiff
path: root/graphics/pgf/contrib/pgf-spectra/pgf-spectraManual.tex
blob: b463370bb653e570ac59b9855ce50bf412f788c7 (plain)
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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
1476
1477
1478
1479
1480
1481
1482
1483
1484
1485
1486
1487
1488
1489
1490
1491
1492
1493
1494
1495
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
1529
1530
1531
1532
1533
1534
1535
1536
1537
1538
1539
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
1616
1617
1618
1619
1620
1621
1622
1623
1624
1625
1626
1627
1628
1629
1630
1631
1632
1633
1634
1635
1636
1637
1638
1639
1640
1641
1642
1643
1644
1645
1646
1647
1648
1649
1650
1651
1652
1653
1654
1655
1656
1657
1658
1659
1660
1661
1662
1663
1664
1665
1666
1667
1668
1669
1670
1671
1672
1673
1674
1675
1676
1677
1678
1679
1680
1681
1682
1683
1684
1685
1686
1687
1688
1689
1690
1691
1692
1693
1694
1695
1696
1697
1698
1699
1700
1701
1702
1703
1704
1705
1706
1707
1708
1709
1710
1711
1712
1713
1714
1715
1716
1717
1718
1719
1720
1721
1722
1723
1724
1725
1726
1727
1728
1729
1730
1731
1732
1733
1734
1735
1736
1737
1738
1739
1740
1741
1742
1743
1744
1745
1746
1747
1748
1749
1750
1751
1752
1753
1754
1755
1756
1757
1758
1759
1760
1761
1762
1763
1764
1765
1766
1767
1768
1769
1770
1771
1772
1773
1774
1775
1776
1777
1778
1779
1780
1781
1782
1783
1784
1785
1786
1787
1788
1789
1790
1791
1792
1793
1794
1795
1796
1797
1798
1799
1800
1801
1802
1803
1804
1805
1806
1807
1808
1809
1810
1811
1812
1813
1814
1815
1816
1817
1818
1819
1820
1821
1822
1823
1824
1825
1826
1827
1828
1829
1830
1831
1832
1833
1834
1835
1836
1837
1838
1839
1840
1841
1842
1843
1844
1845
1846
1847
1848
1849
1850
1851
1852
1853
1854
1855
1856
1857
1858
1859
1860
1861
1862
1863
1864
1865
1866
1867
1868
1869
1870
1871
1872
1873
1874
1875
1876
1877
1878
1879
1880
1881
1882
1883
1884
1885
1886
1887
1888
1889
1890
1891
1892
1893
1894
1895
1896
1897
1898
1899
1900
1901
1902
1903
1904
1905
1906
1907
1908
1909
1910
1911
1912
1913
1914
1915
1916
1917
1918
1919
1920
1921
1922
1923
1924
1925
1926
1927
1928
1929
1930
1931
1932
1933
1934
1935
1936
1937
1938
1939
1940
1941
1942
1943
1944
1945
1946
1947
1948
1949
1950
1951
1952
1953
1954
1955
1956
1957
1958
1959
1960
1961
1962
1963
1964
1965
1966
1967
1968
1969
1970
1971
1972
1973
1974
1975
1976
1977
1978
1979
1980
1981
1982
1983
1984
1985
1986
1987
1988
1989
1990
1991
1992
1993
1994
1995
1996
1997
1998
1999
2000
2001
2002
2003
2004
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
2027
2028
2029
2030
2031
2032
2033
2034
2035
2036
2037
2038
2039
2040
2041
2042
2043
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% pgf-spectraManual documentation
% the manual is not optimized, made by «chunks»
% to carry out the development of the package
% some 'images' was made with separated files
% with the preview package...
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass[a4paper,10pt,oneside,openany,fleqno]{article}
\usepackage{pgf-spectra}
\usetikzlibrary{fadings}
%\usepackage{pgfplots}
%\usepgfplotslibrary{fillbetween}
%\pgfplotsset{width=7cm,compat=1.17}
\usepackage{calc}
\usepackage[english]{babel}
\addtolength{\textwidth}{3.5cm}
\addtolength{\textheight}{2.5cm}
\addtolength{\topmargin}{-1.25cm}
\setlength{\parindent}{0pt}
\setlength{\oddsidemargin}{0pt}
\def\version{2.0.0}%
\def\minorversion{2.1.0}%
\def\minorrevversion{2.1.1}%
\def\minorrev{2.1.2}%
\usepackage[pdfstartview={ },colorlinks=true, linkcolor=black!50!green, citecolor=gray, urlcolor=teal, hyperindex, plainpages=false,bookmarksopenlevel=1,bookmarksopen=true]{hyperref}%
\hypersetup{%Start options on pdf
pdftitle = {Manual for pgf-spectra (v\minorrev)},%
pdfsubject = {Emission and absorption lines of the elements},%
pdfkeywords = {Draw the spectrum of elements in a simple way via pgf/TikZ environment. It's possible to draw a desired spectrum, continuous  or discrete.},%
pdfauthor = {\textcopyright Hugo Gomes},%
%pdfcreator = {\LaTeX\ with package \flqq hyperref\frqq},
pdfproducer = {pdfeTeX-1.\the\pdftexversion\pdftexrevision},
}%End options on pdf
\usepackage[ansinew]{inputenc}
\renewcommand{\rmdefault}{ecverdana}
\renewcommand{\normalfont}{}
\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage{fancyhdr}
\usepackage{lastpage}
\renewcommand{\headrulewidth}{0.4pt}%
\renewcommand{\footrulewidth}{0.4pt}%
\addtolength{\headheight}{25pt}%
\fancypagestyle{pgfSpectraManual}{%
\fancyhf{} % clear all header and footer fields
\fancyhead[R]{\nouppercase{\leftmark}}%
\fancyhead[L]{\color{blue}pgf-spectra \minorrev}%
\fancyfoot[R]{\textbf{\thepage\ of \pageref{LastPage}}}%
\fancyfoot[L]{\ }}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\usepackage{listings}
\lstdefinestyle{numbers}
    {numbers=left, stepnumber=1, numberstyle=\tiny\color{black!70}, numbersep=10pt}
\lstset{%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black},%
    basicstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize,%
    style=numbers,%
    breaklines=true,%
    breakindent=10pt,%
    commentstyle=\fontfamily{Roboto-LF}\selectfont\itshape\footnotesize\color{green!50!black},%
    stringstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize,%
    showstringspaces=false,%
    language=[LaTeX]TeX,%
    defaultdialect=[LaTeX]TeX,%
    deletekeywords={gamma,Gamma},%
    classoffset=0,%
    texcsstyle=*[0]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black}},
    morekeywords={PackageError,RequirePackage,DeclareOption,ExecuteOptions,ProcessOptions,%
                              @Roman,@for,ProvidesPackage,setlength},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{blue!50!black},%
    classoffset=1,%
    texcsstyle=*[1]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{orange!50!black}},%
    morekeywords={PreviewEnvironment,definecolor,colorlet,pgfkeys,tikz,%
                              foreach,pgfmathparse,pgfmathresult,pgfmathprintnumberto,pgfdeclarehorizontalshading,draw,node,%
                              pgfdeclareradialshading,pgfdeclareverticalshading,clip},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{orange!50!black},%
    classoffset=2,%
    texcsstyle=*[2]{\fontfamily{Roboto-LF}\selectfont\footnotesize\color{red!55!black}},%
    morekeywords={wlcolor,tempercolor,pgfspectra,pgfspectraStyle,pgfspectraStyleReset,pgfspectrashade,%
                               pgfspectraplotshade,pgfspectraplotmap,pgfspectrarainbow},%
    keywordstyle=\fontfamily{Roboto-LF}\selectfont\footnotesize\color{red!55!black},%
    classoffset=0%
}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\input{pgf-spectraManual_defs.tex}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\title{Manual for pgf-spectra \minorrev}
\author{Hugo Gomes\\
  \texttt{hugo.parelho@gmail.com}}
\date{3rd July 2021}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\begin{document}%
\usefont{T1}{verdana}{m}{n}%
\vfill
\begin{titlepage}
\maketitle\thispagestyle{empty}%
\begin{center}%\pgfspectra[element={Hg},charge=all,back=visible40,gamma=.6]
\pgfspectra[element=Hg,axis,axis step=50,begin=100,end=1100,back=visible40,gamma=.6,line width=.5pt]
\\ \footnotesize\textsf{\txtspecopt[element=Hg,axis,axis step=50,begin=100,end=1100,back=visible40,gamma=.6,line width=.5pt]}
\end{center}
\vfill
\makebox[\linewidth][c]{\tikz{%
\node[text width=.9\linewidth+.5cm,text justified,draw=blue!25!black,rounded corners=10pt,fill=blue!10] at (0,0) {\color{blue!25!black}
\begin{abstract}
\noindent The purpose of this package is to draw the spectrum of elements in a simple way. It's based on the package \textit{pst-spectra}, but with some extra options. It relies on the pgf/\textrm{Ti\textit{k}Z} to draw the desired spectrum, continuous or discrete. As in \textit{pst-spectra} there are data available for the spectra of 98 elements and their ions. It also allows the user to draw a spectrum with their own personal data.
\\ [4pt]In version 2.0.0 the previous data of the visible region was extended to include lines from Extreme UV to Near IR ($10\,nm\leq\lambda\leq4\hspace{.05pt}000\,nm$). \textit{See section \hyperlink{sec:data}{The lines data} below for more information.}
\\ [4pt]Also in version 2.0.0 the possibility to redshift the lines of spectra was introduced, by entering directly the redshift value or the velocity and the angle to compute the redshift value (Doppler Redshift).
\\ [4pt]In version 2.1.0 a new color conversion (correlated color temperature), shadings for use with \txttikz{} and/or \txtPGFPLOTS{} and a color map for use with \txtPGFPLOTS{} were introduced.
\\ [4pt]In version 2.1.1 two new options are available in the shading for use with \txtPGFPLOTS{} (or \txttikz{}): shade begin and logarithmic (which builds the shading in a logarithmic scale).
\\ [4pt]In this release -- version 2.1.2 -- only a small fix was made (wrong char encoding in style definition file -- pgf-spectra.sty).
\\ [6pt]
\end{abstract}
};}}
\vfill\vfill\vfill\vfill
\end{titlepage}
\newpage%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\pagestyle{empty}%
\tableofcontents%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\addtocounter{page}{-2}
\pagestyle{pgfSpectraManual}
\ \vfill
\section{Installation and usage}
\noindent
\pack{} is placed under the terms of the \LaTeX{} Project Public License, version 1.3 or later (http://www.latex-project.org/lppl.txt). \pack{} loads and only requires the package \href{https://www.ctan.org/pkg/pgf}{\txttikz{}}.
\\ [6pt]You need to put the style file (pgf-spectra.sty) in a location where \texttt{\large PDF}\LaTeX{} can find them. According to the TDS conventions this may be a subdirectory named tex/latex/pgfspectra/ or tex/latex/misc/ in your (site specific) installation tree (insert your appropriate directory delimiter instead of /, if needed).
\\ [6pt]If you are using \texttt{\large PDF}\LaTeX{}, just can simply include the style file without any option via the \large\verb|\usepackage|\normalsize\ command, \large\verb|\usepackage{pgf-spectra}|\normalsize
\\ [6pt]It can also be loaded with \textit{one option} to select the data source:\\ \large\verb|\usepackage[option]{pgf-spectra}|\normalsize
\\ [6pt]\textit{\bfseries For more detailed information see section \hyperlink{sec:data}{The lines data}.}
\vfill\vfill\vfill\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{What's new}
\vspace{-32pt}\ \subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ In version \minorrevversion{}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{In version \minorrevversion{}}{In version 2.1.1}}%
\begin{itemize}
\item Code rewrote for the command \txtplotshadename, supporting two new keys:
\begin{itemize}
\item shade begin
\item logarithmic%
\end{itemize}
\end{itemize}
\vspace{-32pt}\
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ In version \minorversion{}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{In version \minorversion{}}{In version 2.1.0}}%
\begin{itemize}
\item The continuous visible region is now drawn via \txttikz{} shading, improving a little bit the speed of the whole process.
\item Minor fix: the width of the emission/absortion lines are now correctly drawn.
\item New keys for \txtspec:
\begin{itemize}
\item use visible shading
\item backVIS
\item axis unit
\item axis unit precision
\end{itemize}
\item New color conversion command, which converts a temperature in Kelvin to the correspondent rgb color, based on correlated color temperature:
\begin{itemize}\item\txttempercolor{temperature in Kelvin}\end{itemize}
\item New commands that provides shadings to use in \txttikz{}:
\begin{itemize}
\item\txtshade% \pgfspectrashade[type=<h|v>](start,end){name} ---> type: h-horizontal (default) | v-vertical
\item\txtrainbow% \pgfspectrarainbow[<tikz options>](<rainbow fade>,<rainbow start>,<rainbow knock out>,<rainbow background>,<rainbow transparency>){radius}
\\ [6pt]The \txttikz{} keys that affect the rainbow are:
\begin{itemize}
\item color\item opacity\item scope fading
\end{itemize}
The specific rainbow options are:
\begin{itemize}
\item rainbow fade%default={},% -> applies a scope fading in clipped region
\item rainbow start%default=.6,% -> 60%
\item rainbow knock out%default=.4,% -> 40%
\item rainbow background%default=blue,%
\item rainbow transparency%default=0
\end{itemize}
\end{itemize}
\item New command that provides a shading to use in \href{https://ctan.org/pkg/pgfplots}{\txtPGFPLOTS{}}:
\begin{itemize}
\item\txtplotshade\ % \pgfspectraplotshade{name} or
with the following specific keys% \pgfspectraplotshade[options]{name}
\begin{itemize}
\item shade end%default=780,% minimum value 381
\item shade opacity%default=1,%
\item shade opacity color%default=white%
\end{itemize}
\end{itemize}
\item New command that builds a color map to use in \txtPGFPLOTS{}:
\begin{itemize}
\item\txtplotmap% \pgfspectraplotmap[<l|h>]{name}
% l -> low resolution (51 colors -> 380 to 780 nm ; step 8 nm) ! Default
% h -> high resolution (401 colors -> 380 to 780 nm ; step 1 nm)
\end{itemize}
\end{itemize}
\newpage%
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ In version \version{}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{In version \version{}}{In version 2.0.0}}%
\begin{itemize}
\item The package can now be loaded with one of the following options:
\begin{itemize}
\item {\large\verb|\usepackage[NIST]{pgf-spectra}|} (\textbf{\small default})
\item {\large\verb|\usepackage[LSE]{pgf-spectra}|}
\end{itemize}
\item Range of spectral window from $10\,nm$ to $4000\,nm$ (previous version from $380\,nm$ to $780\,nm$).
\item Added the lines data outside the visible range for the 98 elements.
\item No more dependency on the package \textsf{\large ifthen} (code rewritten with the \textsf{\textbackslash\large\ ifx} \TeX\ primitive).
\item Setting/disabling global options to draw the spectra's with the new commands:
\begin{itemize}
\item \txtspecstyle[options]
\item \txtspecstylereset
\end{itemize}
\item New keys:
\begin{itemize}
\item axis ticks
\item backIRUV (only for emission spectrum)
\item IRcolor (for emission lines and for background in absorption spectrum)
\item UVcolor (for emission lines and for background in absorption spectrum)
\item redshift
\item show redshift value
\end{itemize}
\item The issues with the zooming of the pdf viewer sometimes introducing blank lines in the spectra have been fixed:
\\ [2pt]\makebox[\linewidth][c]{\includegraphics[width=.9\linewidth]{figsManual/linesOld.jpg}}%
\\ [2pt]The rendition should now be working for every zoom (I hope!):
\\ [2pt]\makebox[\linewidth][c]{\pgfspectra[width=.9\linewidth]}%
\\ [8pt]\makebox[\linewidth][r]{\small\color{purple}Many thanks to \textit{Daniel García}\/'s suggestion to solve this problem!}
\item Fixed the problem when putting the spectra inside any horizontal \TeX\ box, like \textsf{\large\textbackslash makebox}, \textsf{\large\textbackslash mbox} or \textsf{\large\textbackslash hbox}.
    \\ [3pt]For instance, the code \textsf{\large\textbackslash makebox[\textbackslash textwidth][c]\{\txtspecopt[element=He]\}}:
\begin{itemize}
    \item had as a result in the previous version (version 1.0):
    \\ [3pt]\includegraphics{figsManual/pgfspectraV10badBox.pdf}
    \item  and will result in current version (\version) at:
    \\ [3pt]\includegraphics{figsManual/pgfspectraV200goodBox.pdf}
\end{itemize}
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section{The lines data}
\hypertarget{sec:data}{There are} two data sets availbale for drawing the spectra: one based in the previous version, whose data was initially obtained from the package \href{https://www.ctan.org/pkg/pst-spectra}{\textsf{pst-spectra}} and the other obtained from \href{https://physics.nist.gov/PhysRefData/Handbook/Tables/findinglist.htm}{NIST}.
\\ [12pt]\tikz{\node[text width=\linewidth-12mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=6mm,text justified] {In both cases are included the lines for 98 elements, from hydrogen ($Z=1$) to eins\-teinium ($Z=99$), except for francium ($Z=87$). For each element there are lines between $10\,nm$ and $4000\,nm$ (obtained from the referred pages at February 2021).};}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Data based on pst-spectra}
\tikz{\node[text width=\linewidth-4mm,draw=teal,rounded corners=2pt,fill=black!10,inner sep=2mm,text centered] {This set was obtained from \href{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}};}
\\ [10pt]According to the information on the page the listed lines are based on "Line Spectra of the Ele\-ments", Joseph Reader and Charles H. Corliss CRC Handbook of Chemistry and Physics. This book refers that «The table contains the outstanding spectral lines of neutral ($I$) and singly ionized ($II$) atoms of the elements from hydrogen through plutonium ($Z=1-94$); selected strong lines from doubly ionized ($III$), triply ionized ($IV$), and quadruply ionized ($V$) atoms are also included.»
\\ [6pt]\makebox[66pt][s]{}\begin{minipage}{\linewidth-66pt}\color{black!70}\small Note: pst-spectra documentation refers "\textit{Line Spectra of the Elements from the Astronomical Data Center of NASA}" as the source material, but I'm assuming the original source is "\textit{Line Spectra of the Ele\-ments}"\textit{, Joseph Reader and Charles H. Corliss CRC Handbook of Chemistry and Physics}, obtained from \href{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}{http://cdsarc.u-strasbg.fr/viz-bin/Cat?VI/16}.\end{minipage}
\\ [12pt]\tikz{\node[text width=\linewidth-4mm,draw=purple,rounded corners=2pt,fill=black!10!purple!10,inner sep=2mm,text justified] {To use this data set load the package \pack{} with the option \verb|LSE| (acronym to Line Spectra of the Elements):%
 \\ [6pt]\large\color{purple}\verb|\usepackage[LSE]{pgf-spectra}|\\ [6pt]\small\color{orange}\hfill Number of lines provided: 46065 (see file pgf-spectraDataLSE.pdf)};}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\subsection{Data based on NIST}
\tikz{\node[text width=\linewidth-4mm,draw=teal,rounded corners=2pt,fill=black!10,inner sep=2mm,text centered] {This set was obtained from \href{https://physics.nist.gov/PhysRefData/Handbook/Tables/findinglist.htm}{https://physics.nist.gov/PhysRefData/Handbook/Tables/findinglist.htm}};}
\\ [10pt]According to the information on the page the listed lines «includes data for the neutral and singly-ionized atoms».
\\ [6pt]\makebox[66pt][s]{}\begin{minipage}{\linewidth-66pt}{\color{black!70}\small Note: \textbf{This set is loaded by default}. Because the data to search is slightly smaller (only neutral and singly-ionized atoms) the time consumption when building the spectra could be a bit lower.}\end{minipage}
\\ [12pt]\tikz{\node[text width=\linewidth-4mm,draw=purple,rounded corners=2pt,fill=black!10!purple!10,inner sep=2mm,text justified] {To use this data set load the package \pack{} without options: \\ [6pt]\large\color{purple}\verb|\usepackage{pgf-spectra}|\\ [6pt]\small\color{orange}\hfill Number of lines provided: 11980 (see file pgf-spectraDataNIST.pdf);}}
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{The commands}
\hypertarget{sec:com}{The} four \textit{main} commands, those related with this package itself, are:
\begin{itemize}
\item\txtspec{} or \txtspecopt[options list]
\item\textcolor{blue!50!black}{\textbackslash wlcolor\{}\textcolor{red!50!black}{wavelength}\textcolor{blue!50!black}{\}}
\item\txtspecstyle[options]
\item\txtspecstylereset
\end{itemize}
There are other four commands to use with \txttikz{} and/or \txtPGFPLOTS{}:
\begin{itemize}
\item\txttempercolor{Kelvin}
\item\txtshade
\item\txtplotshade
\item\txtplotmap
\end{itemize}
And finally \textit{just for fun} a command that draws a rainbow:
\begin{itemize}
\item\txtrainbow
\end{itemize}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vspace{-32pt}\
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtspec{}}%
\label{command:pgfspectra}\addcontentsline{toc}{subsection}{\texorpdfstring{\txtspec{}}{\textbackslash pgfspectra}}%
\\ [4pt]This command is used without options to draw the visible continuous spectrum:
\\ \sectioncom{\txtspec}{\pgfspectra}{.05\linewidth-.3333em}
\\ When using options, a continuous or discrete spectra in the visible region can be drawn, for ins\-tance:
\\ [4pt]\sectioncom{\txtspecopt[width=.5\textbackslash textwidth,height=1.25cm]}{\pgfspectra[width=.5\textwidth,height=1.25cm]}{.25\linewidth-.3333em}
\\ \sectioncom{\txtspecopt[width=\textbackslash textwidth,element=Ne]}{\pgfspectra[width=\textwidth,element=Ne]}{0pt}
\\ [4pt]The options available for \txtspec{} are described in section \hyperlink{OPTIONS}{The options for \txtspec}.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ [-32pt]\ %
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \textcolor{blue!50!black}{\textbackslash wlcolor\{}\textcolor{red!50!black}{wavelength}\textcolor{blue!50!black}{\}}}%
\label{command:wlcolor}\addcontentsline{toc}{subsection}{\texorpdfstring{\textcolor{blue!50!black}{\textbackslash wlcolor\{}\textcolor{red!50!black}{wavelength}\textcolor{blue!50!black}{\}}}{\textbackslash wlcolor}}%
\\ [4pt]A command to convert a wavelength from 380 to 780 nanometres (or other value in the range $10\,nm\leq\lambda\leq4000\,nm$) to the respective color available as `wlcolor':
\\ [10pt]\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {\vbox to 46pt{%
\begin{verbatim}\tikz{\foreach \x in {380,400,...,780}{\wlcolor{\x}
                \draw[fill=wlcolor] (.03*\x,0) rectangle ++(.6,.5)
                            node[midway,font=\tiny\bfseries,text=black!50] {\x};}}\end{verbatim}}};}
\\ [2pt]\makebox[\linewidth][c]{\tikz{\foreach \x in {380,400,...,780}{
                \wlcolor{\x}
                \draw[fill=wlcolor] (.03*\x,0) rectangle ++(.6,.5) node[midway,font=\tiny\bfseries,text=black!50] {\x};
                }
}}
\\ [-6pt]\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}
\newpage%\\ [10pt]
\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {\vbox to 46pt{%
\begin{verbatim}\tikz{\foreach \x/\y in {10/0,100/1,500/2,1000/3,2000/4,3000/5,4000/6}{\wlcolor{\x}
                \draw[fill=wlcolor] (\y,0) rectangle ++(1,.5)
                            node[midway,font=\tiny\bfseries,text=black!50] {\x};}}\end{verbatim}\vfil}};}
\\ [2pt]\makebox[\linewidth][c]{\tikz{\foreach \x/\y in {10/0,100/1,500/2,1000/3,2000/4,3000/5,4000/6}{
                \wlcolor{\x}
                \draw[fill=wlcolor] (\y,0) rectangle ++(1,.5) node[midway,font=\tiny\bfseries,text=black!50] {\x};
                }
}}
\\ [-6pt]\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%\\ [-32pt]\
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtspecstyle[options]}%
\label{command:pgfspectraStyle}\addcontentsline{toc}{subsection}{\texorpdfstring{\txtspecstyle[options]}{\textbackslash pgfspectraStyle}}%
\\ [4pt]Use this command to set the global style of all the subsequent drawn spectra:
\\ \sectioncom{\txtspecopt[element=Ne]\hfill\color{white}(before defining the global style)}%
{\pgfspectra[element=Ne]}{.05\linewidth-.3333em}%
\\ \sectioncom{\txtspecstyle[width=.75\textbackslash textwidth,axis,begin=100,end=1000,axis step=50]%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ [3pt]\txtspecopt[element=Ne]\hfill\color{white}(after defining the global style)}%
{\pgfspectraStyle[width=.75\textwidth,axis,begin=100,end=1000,axis step=50]\pgfspectra[element=Ne]}{.125\linewidth-.9999em}%
\\ \sectioncom{\txtspecopt[element=Ne,\textcolor{red}{back=visible40,gamma=.6}]\hfill\color{white}(adding other options)}%
{\pgfspectra[element=Ne,back=visible40,gamma=.6]}{.125\linewidth-.9999em}%
\\ Note you can locally override the settings defined in the global style:
\\ \sectioncom{\txtspecopt[element=Ne,\textcolor{red}{axis step=100}]\hfill\color{white}(overriding a global option)}%
{\pgfspectra[element=Ne,axis step=100]}{.125\linewidth-.9999em}
\vfill%
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtspecstylereset{}}%
\label{command:pgfspectraStyleReset}\addcontentsline{toc}{subsection}{\texorpdfstring{\txtspecstylereset}{\textbackslash pgfspectraStyleReset}}%
\\ [4pt]Used to reset all the options of the spectra to their default values:
\\ \sectioncom{\txtspecstylereset%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ [3pt]\txtspecopt[element=Ne]}%
{\pgfspectraStyleReset\pgfspectra[element=Ne]}{.05\linewidth-.3333em}
\newpage%\vspace{-32pt}\
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txttempercolor{Kelvin}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{\txttempercolor{Kelvin}}{\textbackslash tempercolor}}%
\label{command:tempercolor}%
\\ [4pt]A command that uses the CIE 1964 10-degree color matching function to convert a given temperature, in Kelvin ($\mathsf{1000\,K\leq T\leq40\hspace{.1ex}000\,K}$), to the respective correlated color. For more information on the implemented algorithm, please see:
\small\begin{itemize}
\item\href{https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html}{https://tannerhelland.com/2012/09/18/convert-temperature-rgb-algorithm-code.html}
\item\href{https://www.zombieprototypes.com/?p=210}{https://www.zombieprototypes.com/?p=210}
\item\href{https://github.com/neilbartlett/color-temperature}{https://github.com/neilbartlett/color-temperature}
\end{itemize}\normalsize
\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {\vbox to 86pt{%
\begin{verbatim}\foreach \T in {1000,1700,1850,2400,2550,2700,3000,3200,%
                3350,5000,5500,6000,6200,6500,6600,6700,9500,15000,%
                27000,40000}
        {\tempercolor{\T}\tikz{
          \fill[tempercolor,font=\small] (0,0) rectangle (7.5,.5) %
          node[midway] {\color{black}\T\ K};}\\ [-1pt]%
        }%
\end{verbatim}\vfil}};}%
\vspace{-5pt}\begin{center}
\foreach \T in {1000,1700,1850,2400,2550,2700,3000,3200,3350,5000,5500,6000,6200,6500,6600,6700,9500,15000,27000,40000}{%
\tempercolor{\T}\tikz{\fill[tempercolor,font=\small] (0,0) rectangle (7.5,.5) node[midway] {\color{black}\T\ K};}\\ [-1pt]}%
\end{center}
\vspace{-13pt}\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtshade{}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{\txtshade{}}{\textbackslash pgfspectrashade}}%
\label{command:shade}%
\\ [4pt]This commands builds and makes available a \textcolor{red!50!black}{\bfseries h}orizontal or a \textcolor{red!50!black}{\bfseries v}ertical shading, between the `\textcolor{red!50!black}{start}' and `\textcolor{red!50!black}{end}' wavelengths (in nanometres), to use in \txttikz{} pictures with the provided `\textcolor{red!50!black}{name}'.
\\ [2pt]\textit{Note that, in this command, the `start' wavelength needs to be smaller then the `end' wavelength} and is in the visible region: $\lambda_{\textsf{start}}<\lambda_{\textsf{end}}$ and $380\leq\lambda\leq780$.
\\ [2pt]The optional parameter takes the value \textcolor{red!50!black}{\bfseries h} or \textcolor{red!50!black}{\bfseries v} and has the default value of \textcolor{red!50!black}{\bfseries h}.
\\ [6pt]\sectioncom{\txtshadecom(380,780){myShadeA}%
\\ \txtshadecom(500,700){myShadeB}%
\\ \txtshadecomoption[v](380,780){myShadeC}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \txtshadetikz{shading=myShadeA}{0,0}{10,.5}%
\\ \texttt{\txtnewline[3pt]}\txtshadetikz{shading=myShadeB}{0,0}{10,.5}%
\\ \texttt{\txtnewline[3pt]}\txtshadetikz{shading=myShadeC}{0,0}{10,.5}%
\\ \texttt{\txtnewline[3pt]}\txtshadetikz{shading=myShadeA,shading angle=180}{0,0}{10,.5}%
}%
{\\ [-10pt]\pgfspectrashade(380,780){myShadeA}\makebox[\linewidth][c]{\tikz{\fill[shading=myShadeA] (0,0) rectangle (10,.5);}}%
\\ [3pt]\pgfspectrashade(500,700){myShadeB}\makebox[\linewidth][c]{\tikz{\fill[shading=myShadeB] (0,0) rectangle (10,.5);}}%
\\ [3pt]\pgfspectrashade[v](380,780){myShadeC}\makebox[\linewidth][c]{\tikz{\fill[shading=myShadeC] (0,0) rectangle (10,.5);}}%
\\ [3pt]\pgfspectrashade[v](380,780){myShadeC}\makebox[\linewidth][c]{\tikz{\fill[shading=myShadeA,shading angle=180] (0,0) rectangle (10,.5);}}%
}{.05\linewidth-.3333em}%
\vspace{12pt}\ %
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtplotshade}%
\addcontentsline{toc}{subsection}{\texorpdfstring{\txtplotshade{}}{\textbackslash pgfspectraplotshade}}%
\label{command:plotshade}%
\\ [4pt]This command, without any options, builds and makes available a shading in the wavelength range from $\mathsf{380\,nm}$ to $\mathsf{780\,nm}$ to use in \txtPGFPLOTS{} with the provided `\textcolor{red!50!black}{name}'.
\\ [6pt]\sectioncom{%
\txtplotshadecom{myPlotShadeA}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=myPlotShadeA}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade{myPlotShadeA}%
\fbox{\tikz{\fill[shading=myPlotShadeA] (0,0) rectangle (7.5,.75);}}\vspace{3pt}%
}{.05\linewidth-.3333em}%
\\ [4pt]The optional argument can receive specific options for the shade or \txtspec{} options:
\\ [6pt]\sectioncom{%
\txtplotshadecomoption[shade begin=0,shade end=4000,IRcolor=white,UVcolor=white,\\ shade opacity=.2,gamma=.6]{myPlotShadeB}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=myPlotShadeB}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=0,shade end=4000,IRcolor=white,UVcolor=white,shade opacity=.2,gamma=.6]{myPlotShadeB}%
\fbox{\tikz{\fill[shading=myPlotShadeB] (0,0) rectangle (7.5,.75);}}\vspace{3pt}%
}{.05\linewidth-.3333em}%
\\ [4pt]The specific options available are \textcolor{red!50!black}{shade end}, \textcolor{red!50!black}{shade opacity} and \textcolor{red!50!black}{shade opacity color}. See section \hyperlink{OPTIONSplotshade}{The options for \txtplotshadename} for detailed information on using these options. When used in \txtPGFPLOTS{} it's possible to do plots like:
\\ [2pt]\makebox[\linewidth][c]{\hfil\includegraphics[height=4.75cm]{figsmanual/plotshadecom1.pdf}\hfil\includegraphics[height=4.75cm]{figsmanual/plotshadecom2.pdf}\hfil}%
\\ [2pt]For these plots and other ones see \hyperlink{example:pgfspectraplots}{Using \txtplotshadename{} and \txtplotmapname{} with \txtPGFPLOTS{}}.
\newpage%
%\vspace{-32pt}\ %
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtplotmap}%
\addcontentsline{toc}{subsection}{\texorpdfstring{\txtplotmap{}}{\textbackslash pgfspectraplotmap}}%
\label{command:colormap}%
\\ [4pt]This command builds and makes available a \textcolor{red!50!black}{\bfseries l}ow or \textcolor{red!50!black}{\bfseries h}igh \textit{resolution} color map in the wavelength range from $380\,nm$ to $780\,nm$ to use in \txtPGFPLOTS{} with the provided `\textcolor{red!50!black}{name}':
\\ [6pt]\setbox0=\vbox{\begin{verbatim}
\begin{tikzpicture}
\begin{axis}[colormap name=myColorMap]
\addplot+[scatter,only marks,domain=0:8,samples=200] {exp(x)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[colormap name=myColorMap]
\addplot+[scatter,only marks,domain=0:4*pi,samples=200] {sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{verbatim}}%
\sectioncom{\txtplotmapcom{myColorMap}{\small\% low resolution (default value for optional parameter)}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-10pt]\makebox[\linewidth][c]{\includegraphics[height=3.75cm]{figsManual/PGFPLOTS5.pdf}\includegraphics[height=3.75cm]{figsManual/PGFPLOTS6.pdf}}}{.05\linewidth-.3333em}%
\setbox0=\vbox{\begin{verbatim}
\begin{tikzpicture}
\begin{axis}[colormap name=myColorMapH]
\addplot+[scatter,only marks,domain=0:8,samples=200] {exp(x)};
\end{axis}
\end{tikzpicture}
\begin{tikzpicture}
\begin{axis}[colormap name=myColorMapH]
\addplot+[scatter,only marks,domain=0:4*pi,samples=200] {sin(deg(x))};
\end{axis}
\end{tikzpicture}
\end{verbatim}}%
\\ \sectioncom{\txtplotmapcomoption[h]{myColorMapH}{\small\% high resolution (`h' value in optional parameter)}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-10pt]\makebox[\linewidth][c]{\includegraphics[height=3.75cm]{figsManual/PGFPLOTS7.pdf}\includegraphics[height=3.75cm]{figsManual/PGFPLOTS8.pdf}}}{.05\linewidth-.3333em}%
\\ Actually using high or low resolution produces the same effect on plot. The difference resides on the number of colors available to the `color of colormap' feature. For more information see \hyperlink{example:pgfspectraplots}{Using \txtplotshadename{} and \txtplotmapname{} with \txtPGFPLOTS{}}.
%\vfill\vfill%\\ [16pt]
\\ The above commands -- \txtshadename, \txtplotshadename{} and \mbox{\txtplotmapname} -- were inspired in the \textcolor{purple}{TeX - LaTeX Stack Exchange} questions, \href{https://tex.stackexchange.com/q/576755/95441}{Filling optical spectrum curve with color gradient} and \href{https://tex.stackexchange.com/q/348491/95441}{How to create a electromagnetic spectrum using pgfplots package (together with colormaps)}, which were referred by Stefan Pinnow, as  examples, in a features request for the \pack{} package.
%\vfill%
%\newpage
\subsection*{}{\normalfont\large\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Utilization of \txtrainbowtitle{}}%
\addcontentsline{toc}{subsection}{\texorpdfstring{\txtrainbow{}}{\textbackslash pgfspectrarainbow}}%
\label{command:rainbow}%
\\ [4pt]Without options this command draws a rainbow with the specified radius:
\\ \sectioncom{\txtrainbowcom{2cm}%
}{%
\hfil\includegraphics[scale=2]{figsManual/arcoiris1.pdf}%
}{0pt}%
\\ [4pt]The rainbow is designed with the following schema resulting in a clipped and shown region:
\\ [2pt]\makebox[\linewidth][c]{\includegraphics[scale=1.4]{figsManual/arco_iris.pdf}}%
% THE OPTIONS
\\ The options available could be specific options for the rainbow or \textit{common} \txttikz{} options:
% \newminoroption{option}{default}{description}
\begin{itemize}
\item the rainbow specific options:% a comma separated list of 'key=value' pairs as listed below.
\begin{itemize}
\item rainbow start%default=.6,% -> 60%
\item rainbow knock out%default=.4,% -> 40%
\item rainbow fade%default={},% -> applies a scope fading in clipped region
\item rainbow transparency%default=0
\item rainbow background%default=blue,%
\end{itemize}
\item the \txttikz{} options: any option known by \txttikz{} and/or \txttikz{} libraries.
\end{itemize}
For detailed information on using this command see \hyperlink{OPTIONSrainbow}{The options for \txtrainbowname}.
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\section{\texorpdfstring{The options for \txtspec}{The options for \textbackslash pgfspectra}}
\hypertarget{OPTIONS}{For the commands} \txtspec{} and \txtspecsty{} there are a set of options available to draw the spectrum as described below.
\\ [6pt]\tikz{\node[text width=\linewidth-6mm,draw=green!70,rounded corners=2pt,fill=black!10!green!10,inner sep=3mm,text centered] {\color{green!40!black}The list of options is of the form `\textcolor{red!50!black}{key}' or `\textcolor{red!50!black}{key=value}' separated by commas.};}
\vfill%
\label{option_usevisibleshading}%
\newminoroption{use visible shading}{true}{The visible region of the spectra is drawn using a \txttikz{} shading instead of line by line, resulting in a faster drawing of that region. When set to `false' the visible region is drawn line by line: this value could be useful for printers that tend to be problematic when printing the shadings.\\ \ }
\com{\txtspec\\ \txtnewline\txtspecopt[use visible shading=false]}{\vbox{\hbox to \linewidth{\hfil\pgfspectra\hfil}\vskip1pt\hbox to \linewidth{\hfil\pgfspectra[use visible shading=false]\hfil}}}
\endoption%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_width}%
\\ \option{width}{0.9\textbackslash textwidth}{Sets the width of the spectrum.}
\com{\txtspecopt[width=10cm]}{\pgfspectra[width=10cm]}
\endoption%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_height}%
\\ \option{height}{1cm}{Sets the height of the spectrum.}
\com{\txtspecopt[height=40pt]}{\pgfspectra[height=40pt]}
\endoption%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_element}%
\\ \option{element}{NONE}{A single chemical symbol of an element or a list of chemical symbols.}
\com{\txtspecopt[element=H]}{\pgfspectra[element=H]}
\com{\txtspecopt[element=\{H,He\}]}{\pgfspectra[element={H,He}]}
\endoption%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vspace{-32pt}\ %
\label{option_charge}%
\option{charge}{0}{The charge of the \textit{particle} to draw the spectrum. Use `all' to get all available lines for the element, i.e, for the atom and all the positive ions that exist in the database.}
\com{\txtspecopt[element=He]}{\pgfspectra[element=He]}
\com{\txtspecopt[element=He,charge=1]}{\pgfspectra[element=He,charge=1]}
\com{\txtspecopt[element=He,charge=2]}{\pgfspectra[element=He,charge=2]}
\com{\txtspecopt[element=He,charge=all]}{\pgfspectra[element=He,charge=all]}
\endoption%
\vfill%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_Imin}%
\option{Imin}{0}{The minimum intensity of the lines to put in the spectrum. Value from 0 to 1.}
\com{\txtspecopt[element=He,Imin=.5]}{\pgfspectra[element=He,Imin=.5]}
\com{\txtspecopt[element=He,Imin=.05]}{\pgfspectra[element=He,Imin=.05]}
\endoption%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_relativeintensity}%
\\ \option{relative intensity}{false}{Draws the lines respecting the intensity of the observed spectrum.}
\com{\txtspecopt[element=He,relative intensity]}{\pgfspectra[element=He,relative intensity]}
\endoption%
% relative intensity threshold -> Sets the minimum intensity for the lines... Itresh+(1-Itresh)*Iline/Imax
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_relativeintensitytreshold}%
\option{relative intensity threshold}{0.25}{Sets the minimum intensity for the lines in the spectrum when using relative intensities. When set to 0.25 a line with real intensity $0$ will have a spectral intensity of $0.25$ and a line with intensity equal to the max intensity observed in that spectrum will have an intensity in the computed spectrum of $1$, assuming of course, an overall intensity in the range between 0 and 1.}
\newpage%
\com{\txtspecopt[element=He,relative intensity,relative intensity threshold=0]}{\pgfspectra[element=He,relative intensity,relative intensity threshold=0]}
\com{\txtspecopt[element=He,relative intensity,relative intensity threshold=.25]}{\pgfspectra[element=He,relative intensity,relative intensity threshold=.25]}
\com{\txtspecopt[element=He,relative intensity,relative intensity threshold=.5]}{\pgfspectra[element=He,relative intensity,relative intensity threshold=.5]}
\com{\txtspecopt[element=He,relative intensity,relative intensity threshold=.75]}{\pgfspectra[element=He,relative intensity,relative intensity threshold=.75]}
\com{\txtspecopt[element=He,relative intensity,relative intensity threshold=1]}{\pgfspectra[element=He,relative intensity,relative intensity threshold=1]}
In fact, setting the relative intensity threshold to $1$ is equivalent to the spectrum without relative intensities:
\\ \com{\txtspecopt[element=He]}{\pgfspectra[element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_lineintensity}%
\option{line intensity}{100}{Draws all the lines with the specified intensity between 0 and 100 (as a percentage of the maximum intensity).}
\com{\txtspecopt[element=He,line intensity=0]}{\pgfspectra[element=He,line intensity=0]}
\com{\txtspecopt[element=He,line intensity=50]}{\pgfspectra[element=He,line intensity=50]}
\com{\txtspecopt[element=He,line intensity=100]}{\pgfspectra[element=He,line intensity=100]}
\com{\txtspecopt[element=He]}{\pgfspectra[element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vspace{-32pt}\ %
\label{option_gamma}%
\option{gamma}{0.8}{Gamma color correction: any positive value.}
\com{\txtspecopt[gamma=.1]}{\pgfspectra[gamma=.1]}
\com{\txtspecopt[gamma=.8]}{\pgfspectra[gamma=.8]}
\com{\txtspecopt[gamma=1]}{\pgfspectra[gamma=1]}
\com{\txtspecopt[gamma=2]}{\pgfspectra[gamma=2]}
\com{\txtspecopt[gamma=5]}{\pgfspectra[gamma=5]}
\com{\txtspecopt[gamma=10]}{\pgfspectra[gamma=10]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_brightness}%
\option{brightness}{1}{Brightness color correction as in the CMYK color model. Value between 0 and 1. Zero stands for black and one for the maximum bright. \textit{This option only works for the continuous component of the spectra, to change the ``brightness'' of spectral lines use the option `line intensity'}.}
\com{\txtspecopt[brightness=.1]}{\pgfspectra[brightness=.1]}
\com{\txtspecopt[brightness=.5]}{\pgfspectra[brightness=.5]}
\com{\txtspecopt[brightness=1]}{\pgfspectra[brightness=1]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_back}%
\option{back}{black}{Sets the background color of the spectrum. Only useful when there are spectral lines. Some shorthand are defined to put the visible region in the background: `visible5', \mbox{`visible10'}, `visible15', \ldots\ , `visible100'.\\ [4pt]Note: this labels combined with the `brightness' option makes it possible to achieve other values on the background, since the visible amount (5\%,10\%,\ldots) is multiplied by the value of brightness.}
\com{\txtspecopt[element=He,back=white]}{\pgfspectra[element=He,back=white]}
\com{\txtspecopt[element=He,back=black!50]}{\pgfspectra[element=He,back=black!50]}
\com{\txtspecopt[element=He,back=visible50]}{\pgfspectra[element=He,back=visible50]}
\com{\txtspecopt[element=He,back=visible50,brightness=.26]}{\pgfspectra[element=He,back=visible50,brightness=.26]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{backIRUV}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_backIRUV}%
\newoption{backIRUV}{black}{Sets the background color, \textit{only for the emission spectrum}, outside the visible region
\\ ($10nm\leq\lambda<380nm$ and $780nm<\lambda\leq4000nm$)}
\com{\txtspecopt[element=He,back=visible50,begin=100,end=1000,backIRUV=white]}%
{\pgfspectra[element=He,back=visible50,begin=100,end=1000,backIRUV=white]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_IRcolor}%
\newoption{IRcolor}{rgb(0.3157,0.2373,0.2373)}{Sets the color for emission lines and for background in absorption spectrum in the IR region ($780nm<\lambda\leq4000nm$)}
\com{\txtspecopt[element=He,back=visible50,begin=100,end=1000,IRcolor=white]}%
{\pgfspectra[element=He,back=visible50,begin=100,end=1000,IRcolor=white]}
\com{\txtspecopt[element=He,begin=100,end=1000,IRcolor=white,absorption]}%
{\pgfspectra[element=He,begin=100,end=1000,IRcolor=white,absorption]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vspace{-32pt}\ %
\label{option_UVcolor}%
\newoption{UVcolor}{rgb(0.3,0.2568,0.3)}{Sets the color for emission lines and for background in absorption spectrum in the UV region ($10nm\leq\lambda<380nm$)}
\com{\txtspecopt[element=He,back=visible50,begin=100,end=1000,UVcolor=white]}%
{\pgfspectra[element=He,back=visible50,begin=100,end=1000,UVcolor=white]}
\com{\txtspecopt[element=He,begin=100,end=1000,UVcolor=white,absorption]}%
{\pgfspectra[element=He,begin=100,end=1000,UVcolor=white,absorption]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_lines}%
\option{lines}{\{\}}{A comma separated list of wavelengths in the interval $[10;4000]\,nm$.\\
\hfill\textit{\footnotesize\textcolor{blue}{(Interval updated in v\version)}}}
\com{\txtspecopt[lines=\{400,500,550,700\}]}{\pgfspectra[lines={400,500,550,700}]}
\\ \com{\txtspecopt[lines=\{200,205,400,500,550,700,850,950,980\},begin=100,end=1000]}%
{\pgfspectra[lines={200,205,400,500,550,700,850,950,980},begin=100,end=1000]}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_linewidth}%
\option{line width}{1pt}{The width of each individual line in the spectrum.}
\com{\txtspecopt[line width=2pt]}{\pgfspectra[line width=2pt]}
\\ \com{\txtspecopt[line width=2pt,element=He]}{\pgfspectra[line width=2pt,element=He]}
\label{option_begin}%
\\ \option{begin}{380}{The starting wavelength in nanometres of the spectrum ($10\leq\lambda\leq4000$).\\ \hfill\textit{\footnotesize\textcolor{blue}{(Interval updated in v\version)}}}
\com{\txtspecopt[begin=500]}{\pgfspectra[begin=500]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vspace{-32pt}\ %%\vfill%
\label{option_end}%
\option{end}{740}{The finishing wavelength in nanometres of the spectrum ($10\leq\lambda\leq4000$).\\ \hfill\textit{\footnotesize\textcolor{blue}{(Interval updated in v\version)}}}
\com{\txtspecopt[end=500]}{\pgfspectra[end=500]}
\\ [3pt]\textbf{Remark:} \textit{it's obviously possible to set `begin' and `end' at the same time and if desired change the order of the wavelengths.}
\\ [3pt]\com{\txtspecopt[begin=500,end=700]}{\pgfspectra[begin=500,end=700]}
\com{\txtspecopt[begin=700,end=500]}{\pgfspectra[begin=700,end=500]}
\com{\txtspecopt[begin=780,end=380]}{\pgfspectra[begin=780,end=380]}
\com{\txtspecopt[begin=780,end=380,element=He]}{\pgfspectra[begin=780,end=380,element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_absorption}%
\option{absorption}{false}{Draws the absorption spectrum instead of the emission one.}
\com{\txtspecopt[element=H,absorption]}{\pgfspectra[element=H,absorption]}
\com{\txtspecopt[element=\{H,He\},absorption]}{\pgfspectra[element={H,He},absorption]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_axis}%
\option{axis}{false}{By default draws a nanometric axis below the spectrum.\\ In v\minorversion\ is now possible to \textit{change the unit} of the axis.}
\com{\txtspecopt[axis]}{\pgfspectra[axis]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage%
\vskip-13.75ex\ %
\option{axis step}{20}{The increment (in nanometres) to use in the axis scale.}
\com{\txtspecopt[axis,axis step=50]}{\pgfspectra[axis,axis step=50]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_axis ticks}%
\vfill%
\label{option_axisticks}%
\newoption{axis ticks}{0}{The number of minor ticks between two consecutive ticks in the axis.}
\com{\txtspecopt[axis,axis ticks=4]}{\pgfspectra[axis,axis ticks=4]}
\\ [2pt]\textit{Keep in mind}, if you desire to divide two consecutive ticks into 10 equal parts set `axis ticks=9':
\\ [3pt]\com{\txtspecopt[axis,axis ticks=9]}{\pgfspectra[axis,axis ticks=9]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_axis unit}%
\vfill%
\label{option_axisunit}%
\newminoroption{axis unit}{nm}{Sets the unit to use in the displayed values of wavelenghts in the axis below the spectrum. Available units are:
\begin{itemize}
\item nanometre (nm): \textcolor{red!50!black}{axis unit=nm}
\item micrometre ($\mathsf{\mu}$m): \textcolor{red!50!black}{axis unit=micron}
\item angstrom ({\AA}): \textcolor{red!50!black}{axis unit=A}
\end{itemize}}
\comnewpage{\txtspecopt[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,back=visible40]\\ \txtnewline%
\txtspecopt[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,back=visible40]\\ \txtnewline%
\txtspecopt[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=A,back=visible40]\\ \txtnewline%
\txtspecopt[element=Hg,begin=1000,end=200,axis,axis step=50,axis ticks=4,back=visible40]\\ \txtnewline%
\txtspecopt[element=Hg,begin=2000,end=200,axis,axis step=100,axis ticks=4,axis unit=A,back=visible40]\\ \txtnewline%
\txtspecopt[element=Hg,begin=4000,end=250,axis,axis step=250,axis ticks=4,axis unit=A,back=visible40]\\ \txtnewline%
\txtspecopt[element=Hg,begin=4000,end=250,axis,axis step=250,axis ticks=4,axis unit=micron,back=visible40]%
}%
{\vbox{\hbox{\pgfspectra[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=A,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=Hg,begin=1000,end=200,axis,axis step=50,axis ticks=4,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=Hg,begin=2000,end=200,axis,axis step=100,axis ticks=4,axis unit=A,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=Hg,begin=4000,end=250,axis,axis step=250,axis ticks=4,axis unit=A,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=Hg,begin=4000,end=250,axis,axis step=250,axis ticks=4,axis unit=micron,back=visible40]}%
}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_axis unit precision}%
\vfill%
\label{option_axisunitprecision}%
\newminoroption{axis unit precision}{3}{Sets the precision of the displayed wavelenghts in the axis below the spectrum.}
\com{\txtspecopt[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,back=visible40]\\ \txtnewline%
\txtspecopt[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,axis unit precision=2,back=visible40]%
}{\vbox{%
\hbox{\pgfspectra[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,back=visible40]}%
\vskip1pt\hbox{\pgfspectra[element=H,begin=200,end=1000,axis,axis step=50,axis ticks=4,axis unit=micron,axis unit precision=2,back=visible40]}%
}}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%
\label{option_axiscolor}%
\option{axis color}{black}{The color of the axis.}
\com{\txtspecopt[axis,axis color=red!50!green!50!blue!50]}{\pgfspectra[axis,axis color=red!50!green!50!blue!50]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage%
\label{option_axisfont}%
\vskip-9.75ex\ \option{axis font}{\textbackslash tiny}{The font specs to use in the axis.}
\com{\txtspecopt[axis,axis font=\textbackslash fontsize\{3\}\{3\}\textbackslash itshape\textbackslash selectfont]}{\pgfspectra[axis,axis font=\fontsize{3}{3}\itshape\selectfont]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ %
\label{option_axisfontcolor}%
\option{axis font color}{white}{The color of the font used in the axis.}
\com{\txtspecopt[axis,axis font color=blue!50!white]}{\pgfspectra[axis,axis font color=blue!50!white]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ %\newpage\vskip-9.75ex\ %
\label{option_label}%
\option{label}{false}{Puts a label for the spectrum.}
\com{\txtspecopt[label]}{\pgfspectra[label]}
\com{\txtspecopt[label,element=He]}{\pgfspectra[label,element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_labelpostion}%
\\ \option{label position}{west}{Sets the position of the label according to:}
\tikz{\path[left color=orange!20,right color=black!30!orange!50,rounded corners=2pt,] (0,0) rectangle ++(\textwidth,2);
\node[dotted,fill=black!20,opacity=.4] (x) at (.5\textwidth,1) {\vbox to 1cm{\hsize=8cm\vfill\hfil\small\itshape spectrum\hfil\vfill}};
\tikzset{inner sep=0.1pt}
\node[left] at (x.west) {west};
\node[above left] at (x.north west) {north west};
\node[above] at (x.north) {north};
\node[above right] at (x.north east) {north east};
\node[right] at (x.east) {east};
\node[below right] at (x.south east) {south east};
\node[below] at (x.south) {south};
\node[below left] at (x.south west) {south west};}
\com{\txtspecopt[label,label position=east,element=He]}{\pgfspectra[label,label position=east,element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_labelfont}%
\\ \option{label font}{\textbackslash bfseries\textbackslash small}{The font specs for the label.}
\com{\txtspecopt[label,label font=\textbackslash footnotesize\textbackslash itshape,element=He]}{\pgfspectra[label,label font=\footnotesize\itshape,element=He]}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vskip-9.75ex\ %
\label{option_labelfontcolor}%
\option{label font color}{black}{The color of the font used in the label.}
\com{\txtspecopt[label,label font color=blue!50!white,element=He]}{\pgfspectra[label,label font color=blue!50!white,element=He]}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_labelbeforetext}%
\\ \option{label before text}{\{\}}{Inserts text before the value stored in the label: if chemical symbols were provided, the label has them stored, otherwise it is empty.}
\com{\txtspecopt[label,label before text=text\textbackslash\ ,element=He]}{\pgfspectra[label,label before text=text\ ,element=He]}
\\ [3pt]\textbf{Remark:} \textit{The \textbackslash}\verb*| | \textit{is to insert a space between the text entered by user and the text stored in label.}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{option_labelaftertext}%
\\ [-10pt]\option{label after text}{\{\}}{Inserts text after the value stored in the label: if chemical symbols were provided, the label has them stored, otherwise it is empty.}
\com{\txtspecopt[label,label after text=\textbackslash\ text,element=He]}{\pgfspectra[label,label after text=\ text,element=He]}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\label{redshift}%
\\ %\vfill%
\label{option_redshift}%
\newoption{redshift}{\{\}}{Redshift (or blueshift) the spectral lines:\\
The redshift value ($z$) is \textit{defined} as $1+z=\lambda_{obs}/\lambda_{E}$ which leaves the observed wavelength to $\lambda_{obs}=(1+z)\lambda_{E}$, given the emitted wavelength of the source ($\lambda_{E}$).
\begin{itemize}
\item\textbf{Use `redshift=<numeric value>'} to directly enter the redshift value
\item or \textbf{use `redshift=\{D=<numeric value 1>/<numeric value 2>\}'} to compute the Relativistic Doppler redshift with $\overline{v}=\textsf{<numeric value 1>}$ and $\theta=\textsf{<numeric value 2>}^o$.
\\[3pt] The Relativistic Doppler redshift ($1+z$) is calculated accordingly:
$$1+z=\frac{1+\overline{v}\cos\theta}{\sqrt{1-\overline{v}^2}}\quad\quad\overline{v}=\frac{v}{c}$$
\\ where $\overline{v}$ is the \textit{normalized velocity} (in units of the speed of light in vacuum, $c$) of the emitter and $\theta$ is the angle between the direction of relative motion and the direction of emission in the observer's frame (zero angle is directly away from the observer).
\\ So, if the source of light is moving away from an observer, then redshift occurs ($z>0$), but, if the source moves towards the observer, then blueshift occurs ($z<0$).
\ \\ [3pt]\makebox[\linewidth][c]{\includegraphics[width=.8\linewidth]{redshift.pdf}}
\end{itemize}}%
% redshift
\\ [3pt]\com{\txtspecopt[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=\{D=.001/0\}]}
{\pgfspectra[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift={D=.001/0}]}\\
\com{\txtspecopt[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=\{D=.001/180\}]}
{\pgfspectra[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift={D=.001/180}]}
%\newpage
\com{\txtspecopt[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=.5]}
{\pgfspectra[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=.5]}\\
\com{\txtspecopt[element=He,absorption,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=-.5]}
{\pgfspectra[element=He,absorption,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=-.5]}%\\
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% show redshift value
\label{option_showredshiftvalue}%
\\ \newoption{show redshift value}{false}{%
Writes the value of the redshift (left below the spectrum).}
\com{\txtspecopt[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=\{D=.001/0\},show redshift value]}
{\pgfspectra[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift={D=.001/0},show redshift value]}\\
\com{\txtspecopt[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=.5,show redshift value]}
{\pgfspectra[element=He,back=visible40,gamma=.6,axis,axis step=50,axis ticks=4,begin=100,end=1000,redshift=.5,show redshift value]}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage%
\section{\texorpdfstring{The options for \txtplotshadename}{The options for \textbackslash pgfspectraplotshade}}
\hypertarget{OPTIONSplotshade}{This command} creates a shade to use with the \texttt{\large\textbackslash addplot} command provided by the \txtPGFPLOTS{} package. The shade starts at \textsf{\large\textcolor{red!50!black}{shade begin}} and finishes at \textsf{\large\textcolor{red!50!black}{shade end}}. The shading could be adjusted using the following options:
\\ [8pt]\tikz{\node[text width={\textwidth-6pt},inner xsep=3pt,draw=green!50,fill=green!10,below right,rounded corners=3pt] at (0,0) {%
\\ \makebox[12pt][s]{}\textbullet\ shade begin%default=380,% minimum value 0
\\ \makebox[12pt][s]{}\textbullet\ shade end%default=780,% maximum value 16000
\\ \makebox[12pt][s]{}\textbullet\ shade opacity%default=1,%
\\ \makebox[12pt][s]{}\textbullet\ shade opacity color%default=white%
\\ \makebox[12pt][s]{}\textbullet\ logarithmic%default=false%
};}%
\label{option_shadebegin}%
\\ [-4pt]\newminorrevoption{shade begin}{380}{This value determines the start wavelength of the computed shading. It should be set equal to the minimum value of the plotted data. It could be different from the inferior limit of the domain provided to the  plot (see the \href{http://mirrors.ctan.org/graphics/pgf/contrib/pgfplots/doc/pgfplots.pdf\#page=55}{\txtPGFPLOTS{} package documentation} for more information). The range of accepted values goes from $\mathsf{0\,nm}$ to (\textcolor{red!50!black}{shade end}-1).}%
\label{option_shadeend}%
\\ [-18pt]\newminoroption{shade end}{780}{This value determines the end wavelength of the computed shading. It should be set equal to the maximum value of the plotted data and could be different from the superior limit of the domain provided to the  plot. The range of accepted values goes from (\textcolor{red!50!black}{shade begin}+1) to $\mathsf{16\hspace{.1pt}000\,nm}$.\\ \ }%
\\ \com[3pt]{%
\txtplotshadecom{shadeDefault}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeDefault}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade{shadeDefault}%
\fbox{\tikz{\fill[shading=shadeDefault] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade begin=600]{shadeBegin600}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeEnd600}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=600]{shadeBegin600}%
\fbox{\tikz{\fill[shading=shadeBegin600] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade end=600]{shadeEnd600}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeEnd1500}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade end=600]{shadeEnd600}%
\fbox{\tikz{\fill[shading=shadeEnd600] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[begin=300,shade end=600]{shade300to600}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade300to600}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=300,shade end=600]{shade300to600}%
\fbox{\tikz{\fill[shading=shade300to600] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[begin=600,shade end=900]{shade600to900}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade600to900}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=600,shade end=900]{shade600to900}%
\fbox{\tikz{\fill[shading=shade600to900] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[begin=300,shade end=900]{shade300to900}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade300to900}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=300,shade end=900]{shade300to900}%
\fbox{\tikz{\fill[shading=shade300to900] (0,0) rectangle (7.5,.75);}}%
}%
\endoption%
\vfill%
\label{option_shadeopacity}%
\newminoroption{shade opacity}{1}{The opacity of the computed shade. `0' stands for $\mathsf{0\%}$ and the shading is totaly transparent; `1' stands for $\mathsf{100\%}$ and the shading isn't transparent at all.}%
\\ \com[3pt]{%
\txtplotshadecom{shadeDefault}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeDefault}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade{shadeDefault}%
\fbox{\tikz{\fill[shading=shadeDefault] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade opacity=.5]{shadeOpacity50}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeOpacity50}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade opacity=.5]{shadeOpacity50}%
\fbox{\tikz{\fill[shading=shadeOpacity50] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade opacity=0]{shadeOpacity0}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeOpacity0}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade opacity=0]{shadeOpacity0}%
\fbox{\tikz{\fill[shading=shadeOpacity0] (0,0) rectangle (7.5,.75);}}%
}%
\endoption%
\vfill%
\label{option_shadeopacitycolor}%
\newminoroption{shade opacity color}{white}{The background color of the computed shading. Only visible when \textcolor{red!50!black}{shade opacity} is lesser then 1.}%
\\ \com[3pt]{%
\txtplotshadecom{shadeDefault}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeDefault}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade{shadeDefault}%
\fbox{\tikz{\fill[shading=shadeDefault] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade opacity color=black]{shadeOpacityBlack}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeOpacityBlack}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade opacity color=black]{shadeOpacityBlack}%
\fbox{\tikz{\fill[shading=shadeOpacityBlack] (0,0) rectangle (7.5,.75);}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[shade opacity color=black, shade \mbox{opacity=.5}]{shadeOpacityBlack50}
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeOpacityBlack50}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade opacity color=black,shade opacity=.5]{shadeOpacityBlack50}%
\fbox{\tikz{\fill[shading=shadeOpacityBlack50] (0,0) rectangle (7.5,.75);}}%
}%
\endoption%
\vfill
\label{option_shadelogarithmic}%
\newminorrevoption{logarithmic}{false}{When set to true the shading is build in a logarithmic scale. The smaller wavelengths are \textit{wided} and the longer ones are \textit{shortened} in the displayed region.}%
\\ \com[3pt]{%
\txtplotshadecomoption[logarithmic]{logshadeDefault}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shadeDefault}{0,0}{7.5,.75}\texttt{\}}%
\\ \txtnewline\texttt{\textbackslash fbox\{}\txtshadetikz{shading=logshadeDefault}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[logarithmic]{logshadeDefault}%
\vbox{\hsize=\linewidth\hfil\fbox{\tikz{\fill[shading=shadeDefault] (0,0) rectangle (7.5,.75);}}%
\vskip0pt\hfil\fbox{\tikz{\fill[shading=logshadeDefault] (0,0) rectangle (7.5,.75);}}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[logarithmic,begin=300,shade end=600]{logshade300to600}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade300to600}{0,0}{7.5,.75}\texttt{\}}%
\\ \txtnewline\texttt{\textbackslash fbox\{}\txtshadetikz{shading=logshade300to600}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[logarithmic,shade begin=300,shade end=600]{logshade300to600}%
\vbox{\hsize=\linewidth\hfil\fbox{\tikz{\fill[shading=shade300to600] (0,0) rectangle (7.5,.75);}}%
\vskip0pt\hfil\fbox{\tikz{\fill[shading=logshade300to600] (0,0) rectangle (7.5,.75);}}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[logarithmic,begin=600,shade end=900]{logshade600to900}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade600to900}{0,0}{7.5,.75}\texttt{\}}%
\\ \txtnewline\texttt{\textbackslash fbox\{}\txtshadetikz{shading=logshade600to900}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[logarithmic,shade begin=600,shade end=900]{logshade600to900}%
\vbox{\hsize=\linewidth\hfil\fbox{\tikz{\fill[shading=shade600to900] (0,0) rectangle (7.5,.75);}}%
\vskip0pt\hfil\fbox{\tikz{\fill[shading=logshade600to900] (0,0) rectangle (7.5,.75);}}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[logarithmic,begin=300,shade end=900]{logshade300to900}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade300to900}{0,0}{7.5,.75}\texttt{\}}%
\\ \txtnewline\texttt{\textbackslash fbox\{}\txtshadetikz{shading=logshade300to900}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[logarithmic,shade begin=300,shade end=900]{logshade300to900}%
\vbox{\hsize=\linewidth\hfil\fbox{\tikz{\fill[shading=shade300to900] (0,0) rectangle (7.5,.75);}}%
\vskip0pt\hfil\fbox{\tikz{\fill[shading=logshade300to900] (0,0) rectangle (7.5,.75);}}}%
}%
\\ \com[3pt]{%
\txtplotshadecomoption[logarithmic,begin=10,shade end=10000]{logshade10to10000}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \texttt{\textbackslash fbox\{}\txtshadetikz{shading=shade10to10000}{0,0}{7.5,.75}\texttt{\}}%
\\ \txtnewline\texttt{\textbackslash fbox\{}\txtshadetikz{shading=logshade300to900}{0,0}{7.5,.75}\texttt{\}}%
}{%
\pgfspectraplotshade[shade begin=10,shade end=10000]{shade10to10000}%
\pgfspectraplotshade[logarithmic,shade begin=10,shade end=10000]{logshade10to10000}%
\vbox{\hsize=\linewidth\hfil\fbox{\tikz{\fill[shading=shade10to10000] (0,0) rectangle (7.5,.75);}}%
\vskip0pt\hfil\fbox{\tikz{\fill[shading=logshade10to10000] (0,0) rectangle (7.5,.75);}}}%
}%
\endoption%
\newpage
\section{\texorpdfstring{The options for \txtrainbowname}{The options for \textbackslash pgfspectrarainbow}}
\hypertarget{OPTIONSrainbow}{For the} command \txtrainbowname{} there are a set of options that control the rainbow drawn.
\\ [8pt]\tikz{\node[text width={\textwidth-6pt},inner xsep=3pt,draw=green!50,fill=green!10,below right,rounded corners=3pt] at (0,0) {%
\\ The specific rainbow options are:
\\ \makebox[12pt][s]{}\textbullet\ rainbow start%default=.6,% -> 60%
\\ \makebox[12pt][s]{}\textbullet\ rainbow knock out%default=.4,% -> 40%
\\ \makebox[12pt][s]{}\textbullet\ rainbow fade%default={},% -> applies a scope fading in clipped region
\\ \makebox[12pt][s]{}\textbullet\ rainbow transparency%default=0
\\ \makebox[12pt][s]{}\textbullet\ rainbow background%default=white,%
\\ Some \txttikz{} keys that affect the rainbow are:
\\ \makebox[12pt][s]{}\textbullet\ `color'\\ \makebox[12pt][s]{}\textbullet\ opacity\\ \makebox[12pt][s]{}\textbullet\ scope fading
};}
\\ [3pt]The default rainbow drawn is:
\\ [3pt]\com{%
\txtrainbowcom{2cm}
}{%
\pgfspectrarainbow{2cm}
}%
\vfill%
\label{option_rainbowstart}%
\newminoroption{rainbow start}{.6}{The fraction from which the rainbow colors begin, relative to the center of a circle with radius 1. This value should be in the interval [0,1].}
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow start=.8){2cm}\textcolor{black!60}{\itshape\% the rainbow colors starts at 1.6cm}
\\ \textbackslash hspace\{1cm\}\textcolor{black!60}{\itshape\%}
\\ \txtrainbowcomoptionrainbow(rainbow start=.4){2cm}\textcolor{black!60}{\itshape\% the rainbow colors starts at .8cm}
}{%
\pgfspectrarainbow(rainbow start=.8){2cm}\hspace{1cm}\pgfspectrarainbow(rainbow start=.4){2cm}
}%
\vfill%
\label{option_rainbowknockout}%
\newminoroption{rainbow knock out}{.4}{The relative distance from the half-circle base to perform the clip. This value should be in the interval [-1,1].}
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow knock out=0){2cm}\textcolor{black!60}{\itshape\% the full half circle}
}{%
\pgfspectrarainbow(rainbow knock out=0){2cm}
}%
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow knock out=.4){2cm}\textcolor{black!60}{\itshape\% the default value}
}{%
\pgfspectrarainbow(rainbow knock out=.4){2cm}
}%
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow knock out=.8){2cm}\textcolor{black!60}{\itshape\% only 80\% of the half circle is shown}
}{%
\pgfspectrarainbow(rainbow knock out=.8){2cm}
}%
\newpage%\\
\com{%
\txtrainbowcomoptionrainbow(rainbow knock out=-.4){2cm}\textcolor{black!60}{\itshape\% «extending» the half-circle}
}{%
\pgfspectrarainbow(rainbow knock out=-.4){2cm}
}%
\\ %\vfill%
\label{option_rainbowfade}%
\newminoroption{rainbow fade}{\{\}}{Applies a scope fading in the clipped region (requires loading the \txttikz{} fadings library). For more information about the fadings see the \txttikz{} manual.}
\\ %\vfill%\newpage%\\
\com{%
\textcolor{black!60}{\itshape\%\textbackslash usetikzlibrary\{fadings\}}%
\\ \textcolor{black!60}{\itshape...}
\\ \txtrainbowcomoptionrainbow(rainbow fade=south){2cm}
\\ \textbackslash hspace\{1cm\}\textcolor{black!60}{\itshape\%}
\\ \txtrainbowcomoptionrainbow(rainbow fade=west){2cm}
}{%
\pgfspectrarainbow(rainbow fade=south){2cm}\hspace{1cm}\pgfspectrarainbow(rainbow fade=west){2cm}
}%
\label{option_raibowtransparency}%
\newminoroption{rainbow transparency}{0}{The overall transparency of the rainbow. `0' ($\mathsf{0\%}$) stands for the fill colors in the rainbow without transparency ; `1' ($\mathsf{100\%}$) represents a totally transparent rainbow.}
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow transparency=.5){2cm}
}{%
\pgfspectrarainbow(rainbow transparency=.5){2cm}
}%
\label{option_rainbowbackground}%
\newminoroption{rainbow background}{white}{The background color below the rainbow (only visible with transparency).}
\\ \com{%
\txtrainbowcomoptionrainbow(rainbow background=blue){2cm}
\\ \textbackslash hspace\{1cm\}\textcolor{black!60}{\itshape\%}
\\ \txtrainbowcomoptionrainbow(rainbow background=blue,rainbow transparency=.5){2cm}
}{%
\pgfspectrarainbow(rainbow background=blue){2cm}\hspace{1cm}\pgfspectrarainbow(rainbow background=blue,rainbow transparency=.5){2cm}
}%
\\ [6pt]Some of the \txttikz{} keys that affect the rainbow:
\\ [3pt]\com{%
\txtrainbowcomoptiontikz[blue]{2cm}\textcolor{black!60}{\itshape\% Setting only the fill color only takes no effect}
}{%
\pgfspectrarainbow[blue]{2cm}%
}%
\\ \com{%
\txtrainbowcomoptiontikz[blue,scope fading=south]{2cm}
}{%
\pgfspectrarainbow[blue,scope fading=south]{2cm}%
}%
\\ \com{%
\txtrainbowcomoptiontikz[blue,opacity=.5]{2cm}
}{%
\pgfspectrarainbow[blue,opacity=.5]{2cm}%
}%
\\ More examples in \hyperlink{example:rainbow}{Using \txtrainbow}.
\newpage%
\section{Examples}\vspace{-22pt}%
\subsection*{}{\normalfont\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Using \textbackslash pgfspectra}
\label{example:pgfspectra}\addcontentsline{toc}{subsection}{\texorpdfstring{Using \txtspec}{Using \textbackslash pgfspectra}}%
\\ [4pt]Here are some examples for drawing some \textit{eventually useful} spectra:
\\ [3pt]\com{\txtspecopt%
[element=He,axis,label,label position=north west,\\ label after text=\textbackslash\ emission spectrum:]}%
{\pgfspectra[element=He,axis,label,label position=north west,label after text=\ emission spectrum:]}
\\ [3pt]\com{\txtspecopt%
[element=He,axis,label,label position=north west,label after text=\\ \textbackslash\ emission spectrum:,relative intensity,relative intensity threshold=.5]}%
{\pgfspectra[element=He,axis,label,label position=north west,label after text=\ emission spectrum:,relative intensity,relative intensity threshold=.5]}
\\ [3pt]\com{\txtspecopt%
[element=He,charge=all,line intensity=50,Imin=.05]}%
{\pgfspectra[element=He,charge=all,line intensity=50,Imin=.05]}
\\ [3pt]\com{\txtspecopt%
[element=He,absorption,axis,label,label position=north west,label after text=\textbackslash\ absorption spectrum:,relative intensity,relative intensity threshold=.5]}%
{\pgfspectra[element=He,absorption,axis,label,label position=north west,label after text=\ absorption spectrum:,relative intensity,relative intensity threshold=.5]}
\\ [3pt]\com{\txtspecopt%
[element=He,charge=all,absorption,line intensity=50]}%
{\pgfspectra[element=He,charge=all,absorption,line intensity=50]}
\\ [3pt]\com{\txtspecopt%
[element=He,charge=all,relative intensity,back=visible75,gamma=2]}%
{\pgfspectra[element=He,charge=all,relative intensity,back=visible75,gamma=2]}
\\ [1pt]\textit{\small When the lines are manually inserted it's possible to use `label before text' only with personalized text. In the next three examples `label before text' is used to make labels for a multiple choice problem, omitting evidently the type of luminous font.}
\\ [3pt] $\checkmark$ Laser He-Ne
\\ [3pt]\com{\txtspecopt%
[height=.7cm,end=740,lines=\{633\},line width=1.25pt,width=.75\textbackslash linewidth,label,axis,label before text=(A),\\axis font=\textbackslash fontsize\{4pt\}\{6pt\}\textbackslash selectfont]}%
{\pgfspectra[height=.7cm,begin=380,end=740,lines={633},line width=1.25pt,width=.75\linewidth,label,axis,label before text=(A),axis font=\fontsize{4pt}{6pt}\selectfont]}
\newpage$\checkmark$ Fluorescent lamp
\\ [3pt]\com{\txtspecopt%
[height=.7cm,end=740,lines=\{380,425,450,525,550,600,625,640,705\}, line width=1.25pt,width=.75\textbackslash linewidth,label,axis,label before text=(B),\\axis font=\textbackslash fontsize\{4pt\}\{6pt\}\textbackslash selectfont]}%
{\pgfspectra[height=.7cm,begin=380,end=740,lines={380,425,450,525,550,600,625,640,705},line width=1.25pt,width=.75\linewidth,label,axis,label before text=(B),axis font=\fontsize{4pt}{6pt}\selectfont]}
\\ [3pt]$\checkmark$ Blue LED
\\ [3pt]\com{\txtspecopt%
[height=.7cm,end=740,lines=\{450,451,452,453,454,455,456,457,458,%
\\459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,%
\\477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,%
\\495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510\},%
\\line width=1.25pt,\mbox{width=.75\textbackslash linewidth,label,axis,label before text=(C)},%
\\axis font=\textbackslash fontsize\{4pt\}\{6pt\}\textbackslash selectfont]}%
{\pgfspectra[height=.7cm,end=740,lines={450,451,452,453,454,455,456,457,458,459,460,461,462,463,464,465,466,467,468,469,470,471,472,473,474,475,476,477,478,479,480,481,482,483,484,485,486,487,488,489,490,491,492,493,494,495,496,497,498,499,500,501,502,503,504,505,506,507,508,509,510},line width=1.25pt,width=.75\linewidth,label,axis,label before text=(C),axis font=\fontsize{4pt}{6pt}\selectfont]}%
\\ [6pt]$\checkmark$ Sun like spectrum%H,He,C,Na,Mg,Fe
\\ [3pt]\com{\txtspecopt%
[element=\{H,Fe,Mg,Na\},absorption,line intensity=40,Imin=.05]}%
{\pgfspectra[element={H,Fe,Mg,Na},absorption,line intensity=40,Imin=.05]}
\\ [6pt]$\checkmark$ Sirius like spectrum
\\ [3pt]\com{\txtspecopt%
[element=\{H,He\},absorption,line intensity=40,Imin=.05]}%
{\pgfspectra[element={H,He},absorption,line intensity=40,Imin=.05]}
\\ [6pt]$\checkmark$ ``Classical'' emission spectra of elements:
\\ [3pt]\com{\txtspecopt%
[element=H,back=visible40,gamma=.6,label,axis,Imin=.05]}%
{\pgfspectra[element=H,back=visible40,gamma=.6,label,axis,Imin=.05]}
\\ [3pt]\com{\txtspecopt%
[element=He,back=visible40,gamma=.6,label,axis,Imin=.05]}%
{\pgfspectra[element=He,back=visible40,gamma=.6,label,axis,Imin=.05]}
\\ [3pt]\com{\txtspecopt%
[element=Ne,back=visible40,gamma=.6,label,axis,Imin=.05]}%
{\pgfspectra[element=Ne,back=visible40,gamma=.6,label,axis,Imin=.05]}
\newpage%
$\checkmark$ Series of hydrogen:
\\ [3pt]\com{\txtspecopt%
[element=H,line width=.5pt,begin=50,end=1950,axis,axis step=100,axis ticks=4,back=visible40,gamma=.6,brightness=.5,label,%
label\\ position=north,label font=\textbackslash footnotesize,label after text=\{ydrogen Lyman, Balmer and Paschen series (wavelengths in nm)\}]}%
{\pgfspectra[element=H,line width=.5pt,begin=50,end=1950,axis,axis step=100,axis ticks=4,back=visible40,gamma=.6,brightness=.5,label,label position=north,label font=\footnotesize,label after text={ydrogen Lyman, Balmer and Paschen series (wavelengths in nm)}]}
\\ [6pt]$\checkmark$ Redshifted \& Blueshifted lines of hydrogen using the \textsf{\textbackslash foreach} statement:
\\ [3pt]\bigexample{%
\txtspecstyle[axis,axis ticks=4,back=visible40,gamma=.6,line width=.5pt]%
\\ [2pt]\txtspecopt[element=H,label,label position=north west,label font=\textbackslash footnotesize,label before text=\{spectra of\textbackslash\ \}]%
\\ [2pt]\textbackslash foreach \textbackslash SQ/\textbackslash z/\textbackslash shift in \{H/0.01/redshifted,H/-0.01/blueshifted\}\{%
\\ \makebox[36pt][s]{}\begin{minipage}{\linewidth-36pt}%
\txtspecopt[element=\textbackslash SQ,label,label position=north west,label font=\textbackslash footnotesize,%
label before text=\{\textbackslash shift\textbackslash\ spectra of\textbackslash\ \},label after text=\{\textbackslash\ (z=\textbackslash z)\},redshift=\textbackslash z]%
\end{minipage}%
\\ \}%
\\ [2pt]\textbackslash foreach \textbackslash SQ/\textbackslash z/\textbackslash shift in \{H/\{D=0.01/0\}/redshifted,H/\{D=0.01/180\}/blueshifted\}\{%
\\ \makebox[36pt][s]{}\begin{minipage}{\linewidth-36pt}%
\txtspecopt[element=\textbackslash SQ,label,label position=north west,label font=\textbackslash footnotesize,%
label before text=\{\textbackslash shift\textbackslash\ spectra of\textbackslash\ \},redshift=\textbackslash z,show redshift value]%
\end{minipage}%
\\ \}%
}{%
\pgfspectraStyle[axis,axis ticks=4,back=visible40,gamma=.6,line width=.5pt,width=\linewidth]%
\pgfspectra[element=H,label,label position=north west,label font=\footnotesize,label before text={spectra of\ }]%
\foreach \SQ/\z/\shift in {H/0.01/redshifted,H/-0.01/blueshifted}{%
\\ \pgfspectra[element=\SQ,label,label position=north west,label font=\footnotesize,label before text={\shift\ spectra of\ },label after text={\ (z=\z)},redshift=\z]%
}%
\foreach \SQ/\z/\shift in {H/{D=0.01/0}/redshifted,H/{D=0.01/180}/blueshifted}{%
\\ \pgfspectra[element=\SQ,label,label position=north west,label font=\footnotesize,label before text={\shift\ spectra of\ },redshift=\z,show redshift value]%
}}%
\newpage%
\subsection*{}\vspace{-22pt}{\normalfont\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Using \txtshadename{} in \txttikz{}}
\label{example:pgfspectratikzshade}\addcontentsline{toc}{subsection}{\texorpdfstring{Using \txtshadename{} in \txttikz{}}{Using \textbackslash pgfspectrashade in TikZ}}%
\\ [4pt]Obviously, the \textit{normal} \txttikz{} keys used to control the shadings apply to the shading generated via \txtshadename{}:
\\ [10pt]\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {%
\txtshadecom(380,780){myShadeA}\\ \txtnewline%
\txtshadetikz{shading=myShadeA,shading angle=180}{0,0}{10,.5}\\ \txtnewline%
\txtshadetikz{shading=myShadeA,shading angle=90}{0,0}{10,.5}\\ \txtnewline%
\txtshadetikz{shading=myShadeA,shading angle=45}{0,0}{10,.5}%
};}
\begin{center}
\tikz{\fill[shading=myShadeA,shading angle=180] (0,0) rectangle (10,.5);}
\\ \tikz{\fill[shading=myShadeA,shading angle=90] (0,0) rectangle (10,.5);}
\\ \tikz{\fill[shading=myShadeA,shading angle=45] (0,0) rectangle (10,.5);}
\end{center}
\vspace{-6pt}\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}
\\ [6pt]Providing an opacity to the drawing and applying a shade works well too:
\\ [10pt]\tikz{\node[fill=black!20,draw=black!20,rounded corners=1pt,right,text width=\textwidth-.6666em] at (0,0) {%
\txtshadecom(380,780){myShadeA}
\begin{itemize}
\item on black background:
\\ \txtnewline\txtshadetikz{shading=myShadeA,opacity=.5}{0,0}{10,.5}%
\item on white background:
\\ \txtnewline\txtshadetikz{white,shading=myShadeA,opacity=.5}{0,0}{10,.5}%
\item on red background:
\\ \txtnewline\txtshadetikz{red,shading=myShadeA,opacity=.5}{0,0}{10,.5}%
\end{itemize}
};}
\begin{center}
\begin{itemize}
\item on black background:
\\ \tikz{\fill[shading=myShadeA,opacity=.5] (0,0) rectangle (10,.5);}
\item on white background:
\\ \tikz{\fill[white,shading=myShadeA,opacity=.5] (0,0) rectangle (10,.5);}
\item on red background:
\\ \tikz{\fill[red,shading=myShadeA,opacity=.5] (0,0) rectangle (10,.5);}
\end{itemize}
\end{center}
\vspace{-6pt}\tikz{\draw[fill=black!20,draw=black!20,rounded corners=1pt] (0,0) rectangle ++(\textwidth,-3pt);}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ The gamma in the generated shade (via \txtshadename{}) could be modified using the `\textcolor{red!50!black}{gamma}' key of \txtspec{} set by the command \txtspecsty:
\\ [2pt]\com{%
\txtshadecom(380,780){myShadeA}%
\\ \txtshadetikz{myShadeA}{0,0}{10,.5}%
}{%
\makebox[\linewidth][c]{\includegraphics{figsManual/tikzshade1.pdf}}%
}%
\\ \com{%
\txtspecstyle[gamma=2]%
\\ \txtshadecom(380,780){myShadeGammaII}%
\\ \txtshadetikz{myShadeGammaII}{0,0}{10,.5}%
}{%
\makebox[\linewidth][c]{\includegraphics{figsManual/tikzshade2.pdf}}%
}%
\\ \com{%
\txtspecstyle[gamma=10]%
\\ \txtshadecom(380,780){myShadeGammaX}%
\\ \txtshadetikz{myShadeGammaX}{0,0}{10,.5}%
\\ \txtspecstylereset%
}{%
\makebox[\linewidth][c]{\includegraphics{figsManual/tikzshade3.pdf}}%
}%
\newpage%
\subsection*{}\vspace{-22pt}{\normalfont\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Using \txtplotshadename{} and \txtplotmapname{} with \txtPGFPLOTS{}}
\label{example:pgfspectraplots}\addcontentsline{toc}{subsection}{\texorpdfstring{Using \txtplotshadename{} and \txtplotmapname{} with \txtPGFPLOTS{}}{Using \textbackslash pgfspectraplotshade and \textbackslash pgfspectraplotmap with PGFPLOTS}}%
\\ [4pt]\hypertarget{example:pgfspectraplots}{The command} \txtplotshadename{} is designed to build a shading to use with \txtPGFPLOTS{}. Next examples show a few possibilities of how it could be used regarding two \textit{sources}: a source of light and their photon flux and the blackbody spectral radiance.
\\ [10pt]\tikz{\node[text width=\linewidth-6pt,inner sep=3pt,rounded corners=2pt,fill=orange!10,draw=orange!50,text justified] {In order to correctly make the filling between the path at axis and the plotted curve, the path should begin at 'shade begin' and end at 'shade end':
\\ \textbf{\textbackslash path[name path=axis] (shade begin,0) -- (shade end,0);}};}
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\vfill%\\ [6pt]
\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\begin{tikzpicture}
\begin{axis}[%
    title= Photon Flux,%
    xlabel={Wavelength [nm]},%
    ylabel={Photon Flux [a.u.]},%
    xmin=300,%
    xmax=800,%
]%
\addplot[smooth, name path=spectrum,white] plot[] coordinates{%
    ( 380, 0 ) (400,5) ( 500, 1 ) ( 520, 3 ) ( 525, 8 ) ( 530, 25 )
    ( 535, 23 ) ( 540, 28 ) ( 545, 34 ) ( 550, 20 ) ( 555, 13 )
    ( 560, 8 ) ( 580, 9 ) ( 600, 18 ) ( 620, 7 ) ( 680, 1 ) ( 780, 0 )
};
\path[name path=axis] (380,0) -- (780,0);
\addplot+ [thick,shading=visiblespectrum]
    fill between[of=spectrum and axis];
\end{axis}
\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecom{visiblespectrum}{\small\% default shading [380;780]nm}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade{visiblespectrum}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots1.pdf}%
}}{.05\linewidth-.3333em}%
\vfill%
\newpage
The above example could be obtained with the following \textit{improved} code, based on a suggestion made by Stefan Pinnow:
\setbox0=\vbox{\begin{verbatim}
\begin{tikzpicture}
        \pgfmathsetmacro{\xmin}{300}
        \pgfmathsetmacro{\xmax}{800}
        \pgfmathsetmacro{\shbegin}{380}
        \pgfmathsetmacro{\shend}{780}
        \pgfspectraplotshade[shade begin=\shbegin,shade end=\shend]{visiblespectrum}
    \begin{axis}[
        title=Photon Flux,
        xlabel={Wavelength in nm},
        ylabel={Photon Flux in a.u.},
        xmin=\xmin,
        xmax=\xmax,
    ]
        \addplot [smooth, name path=spectrum,white] coordinates {
            (380,0) (400,5) (500,1) (520,3) (525,8) (530,25)
            (535,23) (540,28) (545,34) (550,20) (555,13)
            (560,8) (580,9) (600,18) (620,7) (680,1) (780,0)
        };
        \path [name path=axis] (\shbegin,0) -- (\shend,0);
        \addplot+ [thick,shading=visiblespectrum]
            fill between [of=spectrum and axis];
    \end{axis}
\end{tikzpicture}
\end{verbatim}}%
\\ [6pt]\sectioncom{%
\usebox0%
}{%
\ \\ [-5pt]%
\makebox[\linewidth][c]{%
\includegraphics{figsManual/Stefan1.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage
%
\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\begin{tikzpicture}
\begin{axis}[%
    title= Photon Flux,%
    xlabel={Wavelength [nm]},%
    ylabel={Photon Flux [a.u.]},%
    xmin=0,%
    xmax=1000,%
]%
\addplot[smooth, name path=spectrum,white] plot[] coordinates{%
    ( 380, 0 ) (400,5) ( 500, 1 ) ( 520, 3 ) ( 525, 8 ) ( 530, 25 )
    ( 535, 23 ) ( 540, 28 ) ( 545, 34 ) ( 550, 20 ) ( 555, 13 )
    ( 560, 8 ) ( 580, 9 ) ( 600, 18 ) ( 620, 7 ) ( 680, 1 ) ( 780, 0 )
    ( 800, 0) ( 900, 0) ( 1000, 0 )
};
\path[name path=axis] (380,0) -- (1000,0);
\addplot+ [thick,shading=visiblespectrum]
    fill between[of=spectrum and axis];
\end{axis}
\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecomoption[shade end=1000]{visiblespectrum}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade end=1000]{visiblespectrum}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots2.pdf}%
}}{.05\linewidth-.3333em}%
%
\\ [6pt]\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\\ \begin{tikzpicture}
\begin{axis}[%
    title= Photon Flux,%
    xlabel={Wavelength [nm]},%
    ylabel={Photon Flux [a.u.]},%
    xmin=300,%
    xmax=600,%
]%
\addplot[smooth, name path=spectrum,draw=none] plot[] coordinates{%
    ( 380, 0 ) (400,5) ( 500, 1 ) ( 520, 3 ) ( 525, 8 ) ( 530, 25 )
    ( 535, 23 ) ( 540, 28 ) ( 545, 34 ) ( 550, 20 ) ( 555, 13 )
    ( 560, 8 ) ( 580, 9 ) ( 600, 18 )
};
\path[name path=axis] (380,0) -- (600,0);
\addplot+ [thick,shading=visiblespectrum]
    fill between[of=spectrum and axis];
\end{axis}
\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecomoption[shade end=600]{visiblespectrum}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade end=600]{visiblespectrum}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=visiblespectrum] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots3.pdf}%
}}{.05\linewidth-.3333em}%
%
\\ [6pt]\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=visiblespectrumGammaX] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\\ \begin{tikzpicture}
\begin{axis}[%
    title= Photon Flux,%
    xlabel={Wavelength [nm]},%
    ylabel={Photon Flux [a.u.]},%
    xmin=300,%
    xmax=800,%
]%
\addplot[smooth, name path=spectrum,white] plot[] coordinates{%
    ( 380, 0 ) (400,5) ( 500, 1 ) ( 520, 3 ) ( 525, 8 ) ( 530, 25 )
    ( 535, 23 ) ( 540, 28 ) ( 545, 34 ) ( 550, 20 ) ( 555, 13 )
    ( 560, 8 ) ( 580, 9 ) ( 600, 18 ) ( 620, 7 ) ( 680, 1 ) ( 780, 0 )
};
\path[name path=axis] (380,0) -- (780,0);
\addplot+ [thick,shading=visiblespectrumGammaX]
    fill between[of=spectrum and axis];
\end{axis}
\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecomoption[gamma=10]{visiblespectrumGammaX}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[gamma=10]{visiblespectrumGammaX}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=visiblespectrumGammaX] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots4.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage\textbf{Note: when setting the color for IR or UV within \txtplotshadename{} make sure it doesn't end with `!<number>' like `black!40'; use `black!40!white' instead}.
%
\\ [6pt]\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=visiblespectrumIRUV] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\\ \begin{tikzpicture}
\begin{axis}[%
    title= Photon Flux,%
    xlabel={Wavelength [nm]},%
    ylabel={Photon Flux [a.u.]},%
    xmin=300,%
    xmax=900,%
]%
\addplot[smooth, name path=spectrum,white] plot[] coordinates{%
    ( 300 , 0) (320, 15) (340, 1) (365, 1)
    ( 380, 2.5 ) (400,5) ( 500, 1 ) ( 520, 3 ) ( 525, 8 ) ( 530, 25 )
    ( 535, 23 ) ( 540, 28 ) ( 545, 34 ) ( 550, 20 ) ( 555, 13 )
    ( 560, 8 ) ( 580, 9 ) ( 600, 18 ) ( 620, 7 ) ( 680, 1 ) ( 780, 0 )
    ( 800, 2 ) (825, 12) (850, 3) ( 900, 0 )
};
\path[name path=axis] (300,0) -- (900,0);
\addplot+ [thick,shading=visiblespectrumIRUV]
    fill between[of=spectrum and axis];
\end{axis}
\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecomoption[IRcolor=black!40!white,UVcolor=black!60!white,shade begin=300,shade end=900]{visiblespectrumIRUV}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[IRcolor=black!40!white,UVcolor=black!60!white,shade begin=300,shade end=900]{visiblespectrumIRUV}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=visiblespectrumIRUV] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots5.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage
For the \textit{blackbody spectral radiance}, the Planck's distribution is used with the values:
\small\begin{itemize}
\item $\mathsf{c=3\times10^{14}\,microns\cdot s^{-1}}$ -- speed of light
\item $\mathsf{h=6.626\times10^{22}\,kg\cdot microns^2\cdot s^{-1}}$ -- Planck constant
\item $\mathsf{k_B=1.38\times10^{-11}\,kg\cdot microns^2\cdot s^{-2}\cdot K^{-1}}$ -- Boltzmann constant
\item $\mathsf{\lambda}$ -- wavelength ($\mathsf{microns}$)
\item $\mathsf{T}$ -- temperature ($\mathsf{K}$)
\item Planck distribution: $\mathsf{B_\lambda=2hc^2\frac{1}{\lambda^5e^{\frac{hc}{\lambda k_BT}-1}}}$ ($\mathsf{kW\cdot sr^{-1}\cdot m^{-1}\cdot nm^{-1}}$)
\end{itemize}\normalsize
The legend of the plots is created with the following definition:
\\ [-10pt]\small\begin{verbatim}
\def\myentry#1{\tempercolor{#1}%
\tikz{\fill[tempercolor] (0,-.5pt) rectangle (40pt,.5pt)
    node[midway,font=\footnotesize,anchor=mid] {\color{black} T=#1\hspace{.1ex}K};}}%
\end{verbatim}\normalsize%
%
\vspace{6pt}\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\\ \begin{tikzpicture}
\begin{axis}[title=Blackbody,xlabel={Wavelength ($\mathsf{\times10^3\,nm}$)},%
    ylabel={Spectral radiance\\
        $\mathsf{(kW\cdot sr^{-1}\cdot m^{-2}\cdot nm^{-1})}$},%
    ylabel style={align=center},ymax=80,domain=0:4]%
\addplot[smooth, name path=spectrum,black,samples=50,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*7000))-1))};\addlegendentry{\myentry{7000}}%
\addplot[smooth,black,samples=50,densely dashed,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*5500))-1))};\addlegendentry{\myentry{5500}}%
\addplot[smooth,black,samples=50,densely dotted,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*4000))-1))};\addlegendentry{\myentry{4000}}%
\path[name path=axis] (axis cs:0,0) -- (axis cs:1,0);
\addplot+ [white,shading=BBody] fill between[of=spectrum and axis];
\end{axis}\end{tikzpicture}%
\end{verbatim}}%
\sectioncom{\txtplotshadecomoption[shade begin=0,shade end=4000,IRcolor=white,UVcolor=white, gamma=.6,shade opacity=.2]{BBody}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade begin=0,shade end=4000,shade opacity=.2,gamma=.6,IRcolor=white,UVcolor=white]{BBody}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots6.pdf}%
}}{.05\linewidth-.3333em}%
%
\\ [6pt]\sectioncom{\txtplotshadecomoption[shade begin=0,shade end=4000,shade opacity=.2, gamma=.6]{BBody}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade begin=0,shade end=4000,shade opacity=.2, gamma=.6]{BBody}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots7.pdf}%
}}{.05\linewidth-.3333em}%
%
\setbox0=\vbox{\begin{verbatim}
\makebox[\linewidth][c]{%
\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}%
}%
\\ [10pt]\\ \begin{tikzpicture}
\begin{axis}[
    axis background/.style={fill=black},%
    legend style={fill=black,draw=white},%
    title=Blackbody,xlabel={Wavelength ($\mathsf{\times10^3\,nm}$)},%
    ylabel={Spectral radiance\\
        $\mathsf{(kW\cdot sr^{-1}\cdot m^{-2}\cdot nm^{-1})}$},%
    ylabel style={align=center},ymax=80,domain=0:4]%
\addplot[smooth, name path=spectrum,black,samples=50,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*7000))-1))};\addlegendentry{\myentry{7000}}%
\addplot[smooth,black,samples=50,densely dashed,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*5500))-1))};\addlegendentry{\myentry{5500}}%
\addplot[smooth,black,samples=50,densely dotted,thick] plot[]
    {119.268/(x^5*(exp(14404/(x*4000))-1))};\addlegendentry{\myentry{4000}}%
\path[name path=axis] (axis cs:0,0) -- (axis cs:1,0);
\addplot+ [black,shading=BBody] fill between[of=spectrum and axis];
\end{axis}\end{tikzpicture}%
\end{verbatim}}%
\\ [6pt]\sectioncom{\txtplotshadecomoption[shade begin=0,shade end=4000,IRcolor=black,UVcolor=black, gamma=.6,shade opacity=.5,shade opacity color=black]{BBody}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade begin=0,shade end=4000,IRcolor=black,UVcolor=black,shade opacity=.5,gamma=.6,shade opacity color=black]{BBody}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots8.pdf}%
}}{.05\linewidth-.3333em}%
%
\\ [6pt]\sectioncom{\txtplotshadecomoption[shade begin=0,shade end=4000,shade opacity=.5, gamma=.6,shade opacity color=black]{BBody}%{\small\% COMMENTS}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-5pt]\pgfspectraplotshade[shade begin=0,shade end=4000,shade opacity=.5,gamma=.6,shade opacity color=black]{BBody}%
\makebox[\linewidth][c]{\fbox{\tikz{\fill[shading=BBody] (0,0) rectangle (7.5,.75);}}}%
\\ [10pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/pgfspectraplots9.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage%
The above examples could be obtained with a much functional and prettier code, also proposed by Stefan Pinnow:
\small\setbox0=\vbox{\begin{verbatim}
\begin{tikzpicture}[
    /pgf/declare function={
        BlackBodySpectralRadiance(\x,\T) = 119.268/(x^5*(exp(14404/(\x*\T))-1));
    },
]
        \pgfspectraplotshade[
            shade begin=0,
            shade end=4000,
            IRcolor=white,
            UVcolor=white,
            gamma=.6,
            shade opacity=.2,
        ]{BBody}
        \def\myentry#1{\tempercolor{#1}%
            \tikz{\fill [tempercolor] (0,-.5pt) rectangle (40pt,.5pt)
                node [midway,font=\footnotesize,anchor=mid]
                    {\color{black} $T = #1\,\mathrm{K}$};}%
        }
    \begin{axis}[
        title=Blackbody,
        xlabel={Wavelength in $\mathrm{10^3\,nm}$},
        ylabel={%
            Spectral radiance in\\
            $\mathrm{kW\cdot sr^{-1}\cdot m^{-2}\cdot nm^{-1}}$%
        },
        ylabel style={align=center},
        ymax=80,
        cycle list name=linestyles,
        domain=0:4,
        samples=51,
        smooth,
    ]
        \pgfplotsinvokeforeach{7000,5500,4000}{
            \addplot+ [thick,name path=spectrum-#1] {BlackBodySpectralRadiance(x,#1)};
                \addlegendentry{\myentry{#1}}
        }
        \path [name path=axis] (axis cs:0,0) -- (axis cs:4,0);
        \addplot [shading=BBody] fill between [of=spectrum-7000 and axis];
    \end{axis}
\end{tikzpicture}
\end{verbatim}}\normalsize%
\\ [6pt]\sectioncom{\usebox0%
}{%
\ \\ [-5pt]\makebox[\linewidth][c]{%
\includegraphics[width=63.5mm]{figsManual/Stefan2.pdf}%
}\vspace{-4pt}}{.05\linewidth-.3333em}%
%
\newpage%
The \textcolor{red!50!black}{logarithmic} option of the \txtplotshadename{} command could be used as a possible solution for the \textcolor{purple}{TeX - LaTeX Stack Exchange} question, \href{https://tex.stackexchange.com/q/348491/95441}{How to create a electromagnetic spectrum using pgfplots package (together with colormaps)}.
\vfill%\\ [4pt]
\small\setbox0=\vbox{\textit{\bfseries\textcolor{teal}{Filling optical spectrum curve with color gradient (first answer)}}\vskip3pt%
\textcolor{green!70!black}{The original code lines that was replaced, in this possible answer, are commented.}\vskip-3pt%
\begin{verbatim}
\documentclass[12pt]{article}
\usepackage[dvipsnames,table]{xcolor}
\usepackage{siunitx} % SI-units
\usepackage{pgf-spectra}
\usepackage{pgfplots}
\usepgfplotslibrary{units} % to add units easily to axis
\usepgfplotslibrary{fillbetween} % to fill inbetween curves
\usepgfplotslibrary{colormaps} % to create colormaps
\pgfplotsset{width=12.2cm, height=7cm}
\pgfplotsset{compat=newest} %(making it only compatalbe with
                %new releases of pgfplots)
%\pgfdeclarehorizontalshading{visiblelight}{50bp}{
%color(0.00000000000000bp)=(violet);
%color(8.33333333333333bp)=(blue);
%color(16.66666666666670bp)=(cyan);
%color(25.00000000000000bp)=(green);
%color(33.33333333333330bp)=(yellow);
%color(41.66666666666670bp)=(orange);
%color(50.00000000000000bp)=(red)
%}%
%
% make the horizontal shading and set the UV and IR colors -->
%\pgfspectraStyle[gamma=.6]% uncomment to change the gamma
\wlcolor{380}\colorlet{UV}{wlcolor}%
\wlcolor{780}\colorlet{IR}{wlcolor}%
\pgfspectraplotshade[logarithmic, UVcolor=UV]{logvisiblelight}
\pgfspectraplotshade{visiblelight}
%\pgfspectraStyleReset% uncomment to reset the style
\begin{document}
\begin{tikzpicture}[fill between/on layer={axis grid}]
\begin{axis}[
    xlabel={Wavelength},
    xticklabel style = {font=\tiny,yshift=0.2ex},
    xmin=10^-5,
    xmax=10^9,
    x unit=\si{\micro\meter},
    xmode=log,
    ymin=0,
    ymax=1,
    height=3cm,
    yticklabels={},
    ytick=\empty,
    legend cell align=left,
    legend style={at={(0.85,-0.77)},anchor=north}
]
\end{verbatim}}%
\setbox1=\vbox{\begin{verbatim}
\addplot[draw=none, name path=start, forget plot] coordinates{(10^-5,0)(10^-5,1)};
\addplot[draw=none, name path=gamma, forget plot] coordinates{(10^-3,0)(10^-3,1)};
\addplot[draw=none, name path=xrays, forget plot] coordinates{(10^-2,0)(10^-2,1)};
%\addplot[draw=none, name path=uv, forget plot] coordinates{(0.4,0)(0.4,1)};
\addplot[draw=none, name path=uv, forget plot] coordinates{(0.38,0)(0.38,1)};
%\addplot[draw=none, name path=visible, forget plot] coordinates{(0.7,0)(0.7,1)};
\addplot[draw=none, name path=visible, forget plot] coordinates{(0.78,0)(0.78,1)};
\addplot[draw=none, name path=ir, forget plot] coordinates{(10^2.5,0)(10^2.5,1)};
\addplot[draw=none, name path=microwave, forget plot] coordinates{(10^5,0)(10^5,1)};
\addplot[draw=none, name path=radiowave, forget plot] coordinates{(10^9,0)(10^9,1)};
\addplot[violet!20, area legend] fill between[of=start and gamma];
\addlegendentry{$\gamma$-ray}
\addplot[violet!60, area legend] fill between[of=gamma and xrays];
\addlegendentry{X-ray}
%\addplot[violet, area legend] fill between[of=xrays and uv];
\addplot[UV!50,area legend] fill between[of=xrays and uv];
\addlegendentry{Ultra violet}
\addplot[shading=visiblelight, area legend] fill between[of=uv and visible];
\addlegendentry{Visible light}%makes the correct legend (not logarithmic)
\addplot[shading=logvisiblelight,forget plot] fill between[of=uv and visible];
%\addplot[red, area legend] fill between[of=visible and ir];
\addplot[IR!50,area legend] fill between[of=visible and ir];
\addlegendentry{Infrared}
%\addplot[Bittersweet, area legend] fill between[of=ir and microwave];
\addplot[IR!50!Bittersweet, area legend] fill between[of=ir and microwave];
\addlegendentry{Micro wave}
\addplot[Brown, area legend] fill between[of=microwave and radiowave];
\addlegendentry{Radio wave}
\end{axis}
\end{tikzpicture}
\end{document}
\end{verbatim}}\normalsize%
\bigsectioncom{\usebox0}{\usebox1}%
{%
\ \\ [-5pt]\makebox[\linewidth][c]{%
\includegraphics[width=.9\linewidth]{figsManual/SEexchange.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage
\small\setbox0=\vbox{\textit{\bfseries\textcolor{teal}{Filling optical spectrum curve with color gradient (second answer)}}\vskip3pt%
\textcolor{green!70!black}{The original code lines that was replaced, in this possible answer, are commented and the\\ code without changes was omitted.}\vskip-3pt%
\begin{verbatim}
\documentclass{article}
\usepackage{tikz}
\usetikzlibrary{calc, positioning, shapes, backgrounds, fit, arrows}
\usepackage{pgf-spectra}
\usepackage{siunitx}
\usepackage{contour}
\begin{document}
%\pgfdeclarehorizontalshading{visiblelight}{50bp}{%
                            %https://tex.stackexchange.com/a/348492/120853
%    color(0bp)=(violet!25);
%    color(8.33bp)=(blue!25);
%    color(16.67bp)=(cyan!25);
%    color(25bp)=(green!25);
%    color(33.33bp)=(yellow!25);
%    color(41.5bp)=(orange!25);
%    color(50bp)=(red!25)
%}%
%
% make the horizontal shading and set the UV and IR colors -->
%\pgfspectraStyle[gamma=.6]% uncomment to change the gamma
\wlcolor{380}\colorlet{UV}{wlcolor}%
\wlcolor{780}\colorlet{IR}{wlcolor}%
\pgfspectraplotshade[logarithmic,shade opacity=.3]{visiblelight}%
%\pgfspectraStyleReset% uncomment to reset the style
\begin{tikzpicture}[%
        raylabel/.style={font=\scriptsize}
    ]
% ...  code omitted ... %
    % On background layer so already drawn arrow and scale lines cover it up nicely
    \begin{scope}[on background layer]
            \node[
            inner sep=0pt,
            outer sep=0pt,
            %fit={([xshift=-2.2em]WAVELENGTH_0|-ARROW.after tail)
            %([xshift=-2.2em]WAVELENGTH_1|-ARROW.before tail)}, shading=visiblelight]
            fit={([xshift=-1.9em]WAVELENGTH_0|-ARROW.after tail)
            ([xshift=-3em]WAVELENGTH_1|-ARROW.before tail)}, shading=visiblelight]%
            (SMALL_VISIBLE_LIGHT) {};
        \shade[
            left color=white,
            %right color=violet!25,
            right color=UV!25,
            %middle color=violet!5,
            middle color=UV!5,
            outer sep=0pt
            ]
            % ...  code omitted ... %
        \shade[
            %left color=red!25,
            left color=IR!25,
            right color=white,
            %middle color=red!5,
            middle color=IR!5,
            outer sep=0pt,
            ]
            % ...  code omitted ... %
    \end{scope}
\end{verbatim}\vspace{-6pt}}%
\setbox1=\vbox{\begin{verbatim}
    % Some labels can be drawn automatically at the designated label coordinates:
    \foreach [count=\i] \label in {
            {Gamma\\rays},
            {X-rays},
            {},%Skip this one
            {infrared}
        }{
            \node[raylabel, align=center] at (LABEL_\i) {\label};
        }
    % These do not fit the loop and are drawn manually:
    \node[raylabel, align=right, anchor=north] at
            ([yshift=-1em,xshift=-2.5pt]$(WAVELENGTH_-2)!0.45!(WAVELENGTH_0)$)
            {Ultra-\\violet};
    \node[raylabel, fill=white] at (CONNECTION_6) {radio waves};
    \node[raylabel, left=0.1em of CONNECTION_1, align=right] {cosmic\\rays};
    \node[
        draw,
        fill=black!20,
        below=4em of SMALL_VISIBLE_LIGHT,
        align=center,
        label=above:{\textbf{Visible Spectrum}}
        ] (FULL_VISIBLE_LIGHT) {%
        %\pgfspectra[width=13em,height=3em]\\
        \pgfspectra[width=13em,height=3em,axis,axis unit=micron,axis step=100,
                    axis ticks=4,axis unit precision=2]\\%
            %pgfspectra also has a builtin axis which of course much better than
            %this terrible approach, but it is in nanometer
            {\num{0.38} \hfill\num{0.48} \hfill\num{0.58}%
                \hfill \num{0.68} \hfill\num{0.78}}\\
    };
% ...  code omitted ... %
\end{tikzpicture}
\end{document}
\end{verbatim}}\normalsize%
\bigsectioncom{\usebox0}{\usebox1}%
{%
\ \\ [-5pt]\makebox[\linewidth][c]{%
\includegraphics[width=.9\linewidth]{figsManual/SExchange.pdf}%
}}{.05\linewidth-.3333em}%
%
\newpage
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Next examples show possible usage of \textsf{\large color maps} feature of \txtPGFPLOTS{} with the color map build with the \txtplotmapname{} command:
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\\ [6pt]\setbox0=\vbox{\footnotesize\begin{verbatim}
\pgfplotscolorbardrawstandalone[colormap={example}%
        {samples of colormap=(10 of myColorMap)},
colorbar horizontal,colormap access=const]
\\ \pgfplotscolorbardrawstandalone[colormap={example}%
        {samples of colormap=(10 of myColorMap)},
colorbar horizontal,colormap access=map]
% --- code improved by Stefan Pinnow --->
\begin{tikzpicture}
    \foreach \i [
        evaluate=\i as \x using {int(mod(\i,15))},
        evaluate=\i as \y using {floor(\i/15)},
    ] in {0,...,\pgfplotscolormaplastindexof{myColorMap}}{
        \fill [index of colormap={\i of myColorMap}]
            (\x*12pt,-\y*10pt) rectangle ++(12pt,10pt)
                node [inner sep=0pt,midway,font=\tiny,text=white] {\i};
    }
\end{tikzpicture}
\end{verbatim}}%
\sectioncom{\txtplotmapcom{myColorMap}{\small\% default resolution (51 colors)}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-10pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap1.pdf}%
}%
\\ [2pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap2.pdf}%
}%
\\ [2pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap3.pdf}%
}}{.05\linewidth-.3333em}%
%%%%
\vfill%\\ [6pt]
\setbox0=\vbox{\footnotesize\begin{verbatim}
\pgfplotscolorbardrawstandalone[colormap={example}%
        {samples of colormap=(10 of myColorMapH)},
colorbar horizontal,colormap access=const]
\\ \pgfplotscolorbardrawstandalone[colormap={example}%
        {samples of colormap=(10 of myColorMapH)},
colorbar horizontal,colormap access=map]
% --- code improved by Stefan Pinnow --->
\begin{tikzpicture}
    \foreach \i [
        evaluate=\i as \x using {int(mod(\i,15))},
        evaluate=\i as \y using {floor(\i/15)},
    ] in {0,...,\pgfplotscolormaplastindexof{myColorMap}}{
        \fill [index of colormap={\i of myColorMap}]
            (\x*12pt,-\y*10pt) rectangle ++(12pt,10pt)
                node [inner sep=0pt,midway,font=\tiny,text=white] {\i};
    }
\end{tikzpicture}
\end{verbatim}}%
\sectioncom{\txtplotmapcomoption[h]{myColorMap}{\small\% high resolution (401 colors)%
\\ \% color(0) -> 380nm color(1) -> 381nm ... color(60) -> 380+60=440nm ... %
\\ \%\phantom{color(0) -> 380nm color(1)} ... color(400) -> 780nm}%
\\ [-5pt]\tikz[overlay]{\fill[white,rounded corners=0pt] (-.3333em,0) rectangle (\linewidth+.3333em,-3pt);}%
\\ \usebox0%
}{%
\ \\ [-10pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap4.pdf}%
}%
\\ [2pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap5.pdf}%
}%
\\ [2pt]\makebox[\linewidth][c]{%
\includegraphics[scale=1.2]{figsManual/colormap6.pdf}%
}}{.05\linewidth-.3333em}%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage\vfill%
\subsection*{}\vspace{-22pt}{\normalfont\bfseries\raisebox{1.25pt}{$\mathbf{\blacktriangleright}$}\ Using \txtrainbowname}
\label{example:rainbow}\addcontentsline{toc}{subsection}{\texorpdfstring{Using \txtrainbowname}{Using \textbackslash pgfspectrarainbow}}%
\\ [4pt]\hypertarget{example:rainbow}{Here are} some examples of rainbows:
\\ [4pt]\sectioncom{\txtrainbowcom{1cm}
}{%
\\ [2pt]\makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris1.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow{1cm}%1
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow start=0){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris2.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow start=0){1cm}%2
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow start=.4){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris3.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow start=.4){1cm}%3
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow start=.8){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris4.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow start=.8){1cm}%4
%\newpage
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow knock out=.8){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris5.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow knock out=.8){1cm}%5
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow knock out=0){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris6.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow knock out=0){1cm}%6
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow knock out=-.8){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris7.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow knock out=-.8){1cm}%7
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow transparency=.5){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris8.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow transparency=.5){1cm}%8
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow background=white){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris9.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow background=white){1cm}%9
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow background=blue,rainbow transparency=.5){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris10.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow background=blue,rainbow transparency=.5){1cm}%10
\newpage%\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow background=black,rainbow transparency=.5){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris11.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow background=black,rainbow transparency=.5){1cm}%11
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow background=white,rainbow transparency=.5){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris12.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow background=white,rainbow transparency=.5){1cm}%12
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow fade=south){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris13.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow fade=south){1cm}%13
\vfill%
\sectioncom{\txtrainbowcomoptionrainbow(rainbow fade=north){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris14.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow(rainbow fade=north){1cm}%14
%\newpage%
\vfill%
\sectioncom{\txtrainbowcomoptiontikz[white,path fading=south]{1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris15.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow[white,path fading=south]{1cm}%15
%\\ [6pt]%
\vfill%
\sectioncom{\txtrainbowcomoptions[white](rainbow fade=south){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris16.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow[white](rainbow fade=south){1cm}%16
%\\ [6pt]%
\vfill%
\sectioncom{\txtrainbowcomoptions[orange,path fading=west](rainbow fade=south){1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris17.pdf}%
}}{.05\linewidth-.3333em}%
%\\ \pgfspectrarainbow[orange,path fading=west](rainbow fade=south){1cm}%17
%\\ [6pt]%
\vfill%
\sectioncom{\txtrainbowcomoptiontikz[blue,xslant=.1,opacity=.2]{1cm}
}{%
\\ \makebox[\linewidth][c]{%
\includegraphics{figsManual/arcoiris18.pdf}%
}}{.05\linewidth-.3333em}%
\vfill%
%\\ \pgfspectrarainbow[blue,xslant=.1,opacity=.2]{1cm}%18
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\newpage
\section{Alphabetical list of available options}
\makeatletter\colorlet{\@linkcolor}{red!50!black}\makeatother%
% \pgfspectra
\large\txtspec\normalsize
\\ \header
\\ [-1pt]\linhaimpar{\hyperlink{option:absorption}{absorption}}{minimum intensity for the lines in the spectrum when using their relative intensities}{boolean}{false}{\{true, false\}}%
\\ [-1pt]\linhapar{\hyperlink{option:axis}{axis}}{show or hide the axis}{boolean}{false}{\{true, false\}}%
\\ [-1pt]\linhaimpar{\hyperlink{option:axis color}{axis color}}{color of the axis}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{option:axis font}{axis font}}{font of the axis labels}{font commands}{\{\textbackslash tiny\}}{\TeX\ font commands}%
\\ [-1pt]\linhaimpar{\hyperlink{option:axis font color}{axis font color}}{color of the axis labels}{color}{white}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{option:axis step}{axis step}}{interval in nanometres between two major axis ticks}{integer}{20}{[0;|end-begin|]\hspace{.1pt}nm}%
\\ [-1pt]\linhaimpar{\hyperlink{option:axis ticks}{axis ticks}}{number of minor ticks}{integer}{0}{\{0,1,2,3,\ldots\}}%
\\ [-1pt]\linhapar{\hyperlink{option:axis unit}{axis unit}}{unit of the axis labels}{text}{nm}{nm or micron or A}%
\\ [-1pt]\linhaimpar{\hyperlink{option:axis unit precision}{axis unit precision}}{number of significant digits (for values in nanometres) shown in axis labels}{integer}{3}{\{0,1,2,3,\ldots\}}%
\\ [-1pt]\linhapar{\hyperlink{option:back}{back}}{spectrum background color}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{option:backIRUV}{backIRUV}}{IR and UV emission lines color in emission spectrum or background color of IR and UV regions in absorption spectrum}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{option:backVIS}{backVIS}}{visible region background color in emission spectrum or emission lines color in absorption spectrum}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{option:begin}{begin}}{first wavelength, in nanometres}{integer}{380}{[10;4000]\hspace{.1pt}nm}%
\\ [-1pt]\linhapar{\hyperlink{option:brightness}{brightness}}{brightness color correction as in the CMYK color model}{decimal}{1}{[0;1]}%
\\ [-1pt]\linhaimpar{\hyperlink{option:charge}{charge}}{charge of the element(s)}{integer}{0}{LSE Data: \{0,1,2,3,4\} NIST Data: \{0,1\}}%
\\ [-1pt]\linhapar{\hyperlink{option:element}{element}}{chemical symbol of one element or comma sparated list of chemical symbols elements}{text}{NONE}{H to Es except Fr}%
\\ [-1pt]\linhaimpar{\hyperlink{option:end}{end}}{last wavelength, in nanometres}{integer}{780}{[10;4000]\hspace{.1pt}nm}%
\\ [-1pt]\linhapar{\hyperlink{option:gamma}{gamma}}{gamma color correction at the edges of the visible region}{decimal}{0.8}{[0;1]}%
\\ [-1pt]\linhaimpar{\hyperlink{option:height}{height}}{spectrum height}{length}{1cm}{up to maximum \TeX\ dimension (16384pt)}%
\\ [-1pt]\linhapar{\hyperlink{option:Imin}{Imin}}{minimum intensity of the lines}{decimal}{0}{[0;1]}%
\\ [-1pt]\linhaimpar{\hyperlink{option:IRcolor}{IRcolor}}{IR emission lines color in emission spectrum or background color of IR region in absorption spectrum}{color}{rgb(.3157,.2373,\vskip0pt.2373)}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{option:label}{label}}{show or hide the axis labels}{boolean}{false}{\{true, false\}}%
\\ [-1pt]\linhaimpar{\hyperlink{option:label after text}{label after text}}{extra text to place after the label of the spectrum}{text}{\{\}}{}%
\\ [-1pt]\linhapar{\hyperlink{option:label before text}{label before text}}{extra text to place before the label of the spectrum}{text}{\{\}}{}%
\\ [-1pt]\linhaimpar{\hyperlink{option:label font}{label font}}{font of the spectrum label}{font commands}{\{\textbackslash bfseries\textbackslash small\}}{}%
\\ [-1pt]\linhapar{\hyperlink{option:label font color}{label font color}}{color of the font of the spectrum label}{color}{black}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{option:label position}{label position}}{position of the label of the spectrum}{text}{\{west\}}{\{west, north west,\vskip0pt north, north east,\vskip0pt east, south east,\vskip0pt south, south west\}}%
\\ [-1pt]\linhapar{\hyperlink{option:line intensity}{line intensity}}{draw all lines with the same intensity value}{integer}{100}{\{0,1,2,\dots,99,100\}}%
\\ [-1pt]\linhaimpar{\hyperlink{option:linewidth}{line width}}{width of each line drawn in the spectrum}{length}{1pt}{up to maximum \TeX\ dimension (16384pt)}%
\newpage
\large\txtspec\ (continuation)\normalsize
\\ \header
\\ [-1pt]\linhapar{\hyperlink{option:lines}{lines}}{number or comma sparated list of numbers}{integer or decimal}{\{\}}{[10;4000]\hspace{.1pt}nm}%
\\ [-1pt]\linhaimpar{\hyperlink{option:redshift}{redshift}}{computes and draws the redshifted (or blueshifted) lines}{text}{\{\}}{numeric value or \vskip0pt\{numeric value 1/numeric value 2\}}%
\\ [-1pt]\linhapar{\hyperlink{option:relative intensity}{relative intensity}}{draws the lines using their relative intensities}{boolean}{false}{\{true, false\}}%
\\ [-1pt]\linhaimpar{\hyperlink{option:relative intensity threshold}{relative intensity\vskip0pt threshold}}{all lines with intensity}{decimal}{0.25}{[0;1]}%
\\ [-1pt]\linhapar{\hyperlink{option:show redshift value}{show redshift value}}{show or hide the redshift value}{boolean}{false}{\{true, false\}}%
\\ [-1pt]\linhaimpar{\hyperlink{option:use visible shading}{use visible shading}}{visible region is drawn using a shading (instead of line by line)}{boolean}{true}{\{true, false\}}%
\\ [-1pt]\linhapar{\hyperlink{option:UVcolor}{UVcolor}}{UV emission lines color in emission spectrum or background color of UV region in absorption spectrum}{color}{rgb(.3,.2568,.3)}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{option:width}{width}}{spectrum width}{length}{\{0.9\textbackslash textwidth\}}{up to maximum \TeX\ dimension (16384pt)}%
% \pgfspectraplotshade
\\ [10pt]\large\txtplotshadename\normalsize
\\ \header
\\ [-1pt]\linhaimpar{\hyperlink{option:shade begin}{shade begin}}{first wavelength, in nanometres}{integer}{380}{[0;15999]\hspace{.1pt}nm}%
\\ [-1pt]\linhapar{\hyperlink{option:shade end}{shade end}}{last wavelength, in nanometres}{integer}{780}{[1;16000]\hspace{.1pt}nm}%
\\ [-1pt]\linhaimpar{\hyperlink{option:shade opacity}{shade opacity}}{opacity of the computed shade}{decimal}{1}{[0;1]}%
\\ [-1pt]\linhapar{\hyperlink{option:shade opacity color}{shade opacity color}}{background color of the computed shading}{color}{white}{any named color or user defined color}%
\\ [-1pt]\linhaimpar{\hyperlink{option:logarithmic}{logarithmic}}{the shading is build in a logarithmic scale}{boolean}{false}{\{true, false\}}%
% \pgfspectrarainbow
\\ [10pt]\large\txtrainbowname\normalsize
\\ \header
\\ [-1pt]\linhaimpar{\hyperlink{option:rainbow background}{rainbow\vskip0pt background}}{background color below the rainbow}{color}{white}{any named color or user defined color}%
\\ [-1pt]\linhapar{\hyperlink{option:rainbow fade}{rainbow fade}}{scope fading in the clipped region}{text}{\{\}}{any named \txttikz{} fading or user defined\vskip0pt fading}%
\\ [-1pt]\linhaimpar{\hyperlink{option:rainbow knock out}{rainbow knock out}}{relative distance from the half-circle base to perform the clip}{decimal}{.4}{[-1;1]}%
\\ [-1pt]\linhapar{\hyperlink{option:rainbow start}{rainbow start}}{fraction from which the rainbow colors begin, relative to the center of a circle with radius 1}{decimal}{.6}{[0;1]}%
\\ [-1pt]\linhaimpar{\hyperlink{option:rainbow transparency}{rainbow\vskip0pt transparency}}{overall transparency of the rainbow}{decimal}{0}{[0;1]}%
\makeatletter\colorlet{\@linkcolor}{black!50!green}\makeatother%
\newpage
\section{Recommendations and known issues}
The code could be a bit slow, so if there are many spectra to draw, the time consumption to get them could be high. In that case it's preferable to compile individual spectrum via the \textit{preview} package, for later inclusion with \large\verb|\includegraphics{<filename>.pdf}|\normalsize:
\begin{lstlisting}
% <filename>.tex
\documentclass{article}
\usepackage{pgf-spectra}
\usepackage[active,tightpage]{preview}
\PreviewEnvironment{tikzpicture}
\setlength\PreviewBorder{1pt}%
%%%%%%%%%%%%%%%%%
\begin{document}
\pgfspectra[element=H,width=15cm]
\end{document}
\end{lstlisting}
\vspace{18pt}\textit{Hint for \TeX\ `limits'}:
\\ [2pt]\textsf{If tex capacity exceeded when running...
\\ «! TeX capacity exceeded, sorry [main memory size=2000001].»}
\\ [2pt]just make a \textsf{\textbackslash newpage} at the point of origin of the message (ejecting the page releases the \TeX\ memory!)
\\ [18pt]\ %
%\newpage%
\section{The code}
\lstinputlisting{pgf-spectra.sty}
\end{document}