User Tools

Site Tools


latex:tikz:timescales

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
latex:tikz:timescales [2018/06/23 14:07] – created iwnlatex:tikz:timescales [2021/09/18 17:06] (current) iwn
Line 1: Line 1:
 <WRAP group><WRAP half column> <WRAP group><WRAP half column>
 \\ \\ \\ \\
-{{ latex:timeline_example.png ? 1000 }}+{{ latex:tikz:timeline_example.png ? 1000 }}
 \\ \\
 </WRAP><WRAP half column> </WRAP><WRAP half column>
 \\ \\
-{{ latex:timeline_energy_scale_particle_physics.png ? 1000 }}+{{ latex:tikz:timeline_energy_scale_particle_physics.png ? 1000 }}
 \\ \\
 </WRAP></WRAP> </WRAP></WRAP>
Line 12: Line 12:
 \\ \\
 </WRAP><WRAP third column 65%> </WRAP><WRAP third column 65%>
-{{ latex:timeline_particle_physics.png ? 1000 }}+{{ latex:tikz:timeline_particle_physics.png ? 1000 }}
 </WRAP></WRAP> </WRAP></WRAP>
  
  
 Example of timelines and scales with arrows and labels. Example of timelines and scales with arrows and labels.
 +For more related figures, please visit https://tikz.net/category/physics/particle-physics/.
  
 <file python timeline.tex> <file python timeline.tex>
Line 109: Line 110:
      
   % help functions   % help functions
 +  \def\myx(#1){{(#1-\nOne)*\w/\n}}
   \def\arrowLabel(#1,#2,#3,#4){   \def\arrowLabel(#1,#2,#3,#4){
-    \def\xy{{(#1-\nOne)*\w/\n}}; \pgfmathparse{int(#2*100)};+    \def\xy{(#1-\nOne)*\w/\n}; \pgfmathparse{int(#2*100)};
     \ifnum \pgfmathresult<0     \ifnum \pgfmathresult<0
       \def\yyp{{(\lt*(-0.10+#2))}}; \def\yyw{{(\yyp-\la*\lt*#3)}}       \def\yyp{{(\lt*(-0.10+#2))}}; \def\yyw{{(\yyp-\la*\lt*#3)}}
       \draw[<-,thick,black!50!blue,align=center]       \draw[<-,thick,black!50!blue,align=center]
-        (\xy,\yyp) -- (\xy,\yyw) +        (\myx(#1),\yyp) -- (\myx(#1),\yyw) 
-        node[below,black!80!blue] at (\xy,\yyw) {#4}; %,fill=white+        node[below,black!80!blue] {#4}; %,fill=white
     \else     \else
       \def\yyp{{(\lt*(0.10+#2)}}; \def\yyw{{(\yyp+\la*\lt*#3)}}       \def\yyp{{(\lt*(0.10+#2)}}; \def\yyw{{(\yyp+\la*\lt*#3)}}
       \draw[<-,thick,black!50!blue,align=center]       \draw[<-,thick,black!50!blue,align=center]
-        (\xy,\yyp) -- (\xy,\yyw) +        (\myx(#1),\yyp) -- (\myx(#1),\yyw) 
-        node[above,black!80!blue] at (\xy,\yyw) {#4};+        node[above,black!80!blue] {#4};
     \fi}     \fi}
   \def\arrowLabelRed(#1,#2,#3,#4){   \def\arrowLabelRed(#1,#2,#3,#4){
-    \def\xy{{(#1-\nOne)*\w/\n}}; \pgfmathparse{int(#2*100)}; 
     \def\yyp{{(\lt*(-0.10+#2))}}; \def\yyw{{(\yyp-\la*\lt*#3)}}     \def\yyp{{(\lt*(-0.10+#2))}}; \def\yyw{{(\yyp-\la*\lt*#3)}}
-    \fill[red,radius=2pt] (\xy,0) circle;+    \fill[red,radius=2pt] (\myx(#1),0) circle;
     \draw[<-,thick,black!25!red,align=center]     \draw[<-,thick,black!25!red,align=center]
-      (\xy,\yyp) -- (\xy,\yyw) +      (\myx(#1),\yyp) -- (\myx(#1),\yyw) 
-      node[below,black!40!red] at (\xy,\yyw) {\strut#4}; %,fill=white+      node[below,black!40!red] {\strut#4}; %,fill=white
     }     }
      
latex/tikz/timescales.1529755626.txt.gz · Last modified: 2018/06/23 14:07 by iwn