6
$\begingroup$

I have to do a talk about how simulation and testing are coming together. So I have been developing a historical list of events in simulation and events in testing (please add to them if you wish). The problem is I want to have the testing events above the timeline and the simulation events below the timeline. How do I do this?

Here are the two sets of data

test = {
   {{1947} -> "Flutter"},
   {{1940} -> "Tacoma Narrows"},
   {{1954} -> "Fatigue (Comet)"},
   {Interval[{{1912}, {2020}}] -> "Electronic Amplifiers"},
   {{1930} -> "Oscilloscope"},
   {Interval[{{1930}, {1985}}] -> "Analogue Testing"},
   {{1945} -> "Accelerometer"},
   {Interval[{{1985}, {2020}}] -> "Digital Testing"},
   {Interval[{{1975}, {2020}}] -> "Digital Signal Processing"},
   {{1965} -> "Fast Fourier Transform"},
   {Interval[{{1990}, {1986}}] -> "Codification of Testing"}
   }; 

simulation = {
   {Interval[{{1950}, {1990}}] -> "Main Frames"},
   {Interval[{{1900}, {1970}}] -> "Slide Rules"},
   {Interval[{{1970}, {1980}}] -> "Electronic Calculators"},
   {Interval[{{1985}, {2020}}] -> "Workstations"},
   {{1964} -> "NASTRAN"},
   {Interval[{{1983}, {2020}}] -> "NAFEMS"},
   {{1960} -> "Finite Element Analysis"},
   {{2006} -> "ASME Verification and Validation"}
   };

I can make individual plots

  TimelinePlot[test, AspectRatio -> 1/2, BaseStyle -> {FontSize -> 12}]
TimelinePlot[simulation, AspectRatio -> 1/2, 
 BaseStyle -> {FontSize -> 12}]

Mathematica graphics

What I want is a common timeline with the test items above the line and the simulation items below the line. How do I do this? Thanks

$\endgroup$
6
$\begingroup$

You could do something like this:

Show[
    TimelinePlot[#1,AxesOrigin->#2]&@@@{{test,Top},{simulation,Bottom}},
    AspectRatio->1/2,BaseStyle->{FontSize->12},
    PlotRange->All,Frame->False,Axes->{True,False}
    ]

enter image description here

| improve this answer | |
$\endgroup$
  • $\begingroup$ I think you have it. Thanks $\endgroup$ – Hugh Nov 13 '18 at 19:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.