2
$\begingroup$

I am creating a very large TimelinePlot, with perhaps six times the number of entries as in this near-minimal example (code below):

TimelinePlot

Notice that bubble (labels) for the entries below the horizontal axis are all below the horizontal line segments. As such, these bubbles never obscure the horizontal lines and their ranges. Good. The same cannot be said for the label bubbles above the horizontal axis. As you can see the bubble for Frederic Remington obscures the end of the black horizontal segment for Katsushika Hokusai. This problem is far more severe in my full TimelinePlot (with many more entries).

I've tried changing Spacings but that merely adjusts the vertical spacings, and does not prevent the unwanted line overlap.

How can I force all the bubbles above the axis so they do not obscure the horizontal timeline segments?


tlp = TimelinePlot[
   {

    <|{Entity["Person", "LeonardoDaVinci::47w36"] -> 
       Interval[{"1452", "1521"}],
      Entity["Person", "GiovanniBellini::f5m7r"] -> 
       Interval[{"1430", "1516"}],
      "Giovanni Antonio Boltraffio" -> Interval[{"1466", "1516"}],
      "Bernardio Luini" -> Interval[{"1481", "1532"}],
      "Cesare da Sesto" -> Interval[{"1477", "1523"}],
      "Andrea del Verrocchio" -> Interval[{"1435", "1488"}],
      "Paolo Veronese" -> Interval[{"1528", "1588"}]

      }|>,

    <|{Entity["Person", "CamilleCorot::vx57d"] -> 
       Interval[{"1796", "1875"}],
      "Gustav Courbet" -> Interval[{"1819", "1877"}],
      Entity["Person", "HonoreDaumier::8868j"] -> 
       Interval[{"1808", "1879"}],
      Entity["Person", "GustaveCaillebotte::7tgk6"] -> 
       Interval[{"1848", "1894"}]
      }|>,

    <|{Entity["Person", "JosefAlbers::6j228"] -> 
       Interval[{"1888", "1976"}],
      Entity["Person", "WinslowHomer::zyp3z"] -> 
       Interval[{"1836", "1910"}],
      Entity["Person", "FredericRemington::c9p55"] -> 
       Interval[{"1861", "1909"}],
      "Thomas Eakins" -> Interval[{"1844", "1916"}],
      Entity["Person", "ChuckClose::84btx"] -> 
       Interval[{"1940", "2030"}]
      }|>,

    <|{Entity["Person", "ThomasGainsborough::4sjkp"] -> 
       Interval[{"1727", "1788"}],
      "Joseph Wright of Derby" -> Interval[{"1734", "1797"}],
      Entity["Person", "Banksy::72t76"] -> 
       Interval[{"1975", "2030"}],
      Entity["Person", "DavidHockney::k88k8"] -> 
       Interval[{"1937", "2030"}]
      }|>, 

    <|{Entity["Person", "JanDavidszDeHeem::2gt75"] -> 
       Interval[{"1606", "1684"}],
      Entity["Person", "FransHals::c2f7f"] -> 
       Interval[{"1582", "1666"}],
      Entity["Person", "GerritVanHonthorst::9387f"] -> 
       Interval[{"1592", "1656"}],
      "Loyset Liédet" -> Interval[{"1420", "1484"}],
      Entity["Person", "MCEscher::pvv7b"] -> Interval[{"1898", "1972"}]
      }|>,

    <|{Entity["Person", "PabloPicasso::k6djr"] -> 
       Interval[{"1881", "1973"}],
      Entity["Person", "DiegoVelazquez::jk6k2"] -> 
       Interval[{"1599", "1660"}]
      }|>,

    <|{Entity["Person", 
        "HansMemling::q4f6g"] Interval[{"1430", "1494"}],
      Entity["Person", "AlbrechtDurer::qxh64"] -> 
       Interval[{"1471", "1528"}],
      Entity["Person", "GustavKlimt::fssw3"] -> 
       Interval[{"1862", "1918"}]
      }|>,

    <|{"Katsushika Hokusai" -> Interval[{"1760", "1849"}]
      }|>

    },

   PlotRange -> {"1360", "2003"},
   TicksStyle -> 
    Directive[{FontSize -> 14, Italic, Black, 
      FontFamily -> "Times"}],
   PlotStyle -> {Red, Orange, Darker[Yellow], Green, Blue, Purple, 
     Darker[Purple], Black},
   AspectRatio -> 1/2,
   PlotLayout -> "Packed",
   Spacings -> {2, 2, 2, 2, 2, 2},
   Background -> LightGray,
   ImageSize -> 1200,
   AxesOrigin -> Center];
tlp2 = Legended[tlp,
  Placed[LineLegend[{Red, Orange, Darker[Yellow], Green, Blue, Purple,
      Darker[Purple], 
     Black}, (Style[#, 16, Italic, 
        FontFamily -> "Times"] &) /@ {"Italian", "French", "American",
       "British", "Flemish", "Spanish", "German", "Japanese"}, 
    LegendLayout -> (Row[Row[#, Spacer[1]] & /@ #, Spacer[7]] &), 
    LegendMargins -> 0], Below]]
$\endgroup$
  • 1
    $\begingroup$ If you fix the typo (-> is missing in Entity["Person", "HansMemling::q4f6g"] Interval[{"1430", "1494"}]) in the next-to-last entry in the list of associations, the picture looks good. $\endgroup$ – kglr Aug 25 at 0:13
  • $\begingroup$ Oh... thanks so much. Again. $\endgroup$ – David G. Stork Aug 25 at 0:31
  • $\begingroup$ I would have expected assoc = Association["a""b","c"->3] to issue a warning message; it doesn't. We get the message "The argument Association[a b,c->3] is not a valid Association or a list of rules." when when we try to access any element of assoc, say, Values @assoc or Lookup["c"]@assoc. $\endgroup$ – kglr Aug 25 at 0:42

Your Answer

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

Browse other questions tagged or ask your own question.