2
$\begingroup$

I would like to produce a TimelinePlot in which the scale of the abscissa varies nonlinearly (compressing old dates and expanding recent dates). Others have confronted related problems, such as here (Non-linear scaled X axis in DateListPlot) but those earlier solutions (merging separate DateListPlots, each with its own scale) will not work for me because I want the abscissa to vary gradually (like a log plot) and I will have Intervals that have durations that extend over wide periods.

I can of course include Ticks that correspond to nonlinear increments (e.g., for the years 1900, 1950, 1970, 1980, 1985, 1986, ...), but the spatial separation remains (alas) linear.

I have explored all options under TimelinePlot and related timed event display functions, without success.

$\endgroup$
1
$\begingroup$

It is possible to remap the time coordinate manually.

newData = ({scaleFunc[AbsoluteTime[#[[1]]]], #[[2]]} &) /@ origData;

Where the scaleFunc is your time scaling function. Then you would need to use a normal plot function and set the labels for the Ticks manually as well. (I know: Ick!)

This is similar to what i do to smooth time data or fitting time data. I hope that there's a better way and someone corrects me...

$\endgroup$
  • $\begingroup$ Rescaling the data is not likely to work because some of the displays will include the final date. I want Kennedy's assassination to be November 22, 1963—and listed as such—not some transformed value. Moreover, I'll want to compute some durations from the data, such as the delay between event 1 and event 2. This of course will not work if I use the transformed data. In short: your suggestion simply will not work. $\endgroup$ – David G. Stork Jul 8 '15 at 3:44
  • $\begingroup$ @David G. Stork Bummer. That's all i have for you then. Sorry i wasn't able to help! :^( $\endgroup$ – xsk8rat Jul 8 '15 at 21:38

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.