10
$\begingroup$

Bug introduced in 10.1 and fixed in 10.3


The following TimelinePlot behaves as I would expect:

TimelinePlot[{
   <|"key1" -> Interval[{{2010, 1, 1}, {2011, 1, 1}}],"key2" -> {2012, 4, 1}|>, 
   <|"key1" -> Interval[{{2010, 3, 1}, {2011, 1, 1}}],"key2" -> {2012, 1, 2}|>}]

enter image description here

However, if the keys of the second association are changed, the plot does not work:

TimelinePlot[{
   <|"key1" -> Interval[{{2010, 1, 1}, {2011, 1, 1}}],"key2" -> {2012, 4, 1}|>, 
   <|"hello" -> Interval[{{2010, 3, 1}, {2011, 1, 1}}],"goodbye" -> {2012, 1, 2}|>}]

enter image description here

Are datasets required to have the same keys? That seems like a peculiar requirement.

$\endgroup$
  • 4
    $\begingroup$ That's interesting; I'll report it. As a workaround, you can change this to using Labeled, instead: TimelinePlot[Map[KeyValueMap[Labeled[#2, #1] &, #] & @ data]. $\endgroup$ – rcollyer Apr 4 '15 at 15:50
  • $\begingroup$ So should this be tagged as a bug? $\endgroup$ – Cassini Apr 4 '15 at 21:35
  • 1
    $\begingroup$ I find the documentation a bit ambiguous here. The wording wrt the third syntax and Associations could perhaps be interpreted to say that the whole argument should be contained in a single Association containing all events. All examples with associations that I have seen do this (no curly braces), so the syntax you're using might not be intended. $\endgroup$ – Sjoerd C. de Vries Apr 4 '15 at 22:56
  • $\begingroup$ This bug appears to be fixed in MMA 10.3. $\endgroup$ – Cassini Oct 15 '15 at 21:21
4
$\begingroup$

This is fixed in version 10.3.

enter image description here

$\endgroup$

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.