Does anyone have a clever way to make datelistplot act like loglistplot and create nice log Y axis vs. dates?
this is not the same as just logging the y variable before plotting - I want the Y axis to show the actual values on a log scale, not the log values on a linear scale
thanks,
Steven
One way is to use the internal function used by LogPlot and friends.
First, make Mathematica load the .mx file necessary for LogPlot
functionality:
In[1]:= LogPlot
Out[1]= LogPlot
Next, let's make some data:
data = CountryData["US", {"GDP", All}];
We need to scale the data:
scaledata = data;
scaledata[[All, -1]] = Log[scaledata[[All, -1]]];
Now, we use the internal function Graphics`LogPlotDump`LogScale (this is
why we executed In[1], as this function would be undefined if we hadn't):
ticks = Graphics`LogPlotDump`LogScale[Min[scaledata[[All, -1]]],
Max[scaledata[[All, -1]]]];
Finally, you are ready to make the DateListPlot:
DateListPlot[scaledata, FrameTicks -> {Automatic, ticks, True, None}]
<plot snipped>
Carl Woll
Wolfram Research
I don't have code to do this (I may have to write something), but I
wish this functionality were built in. (Are you listening Darren?)
--Mark
Tom Dowling
On 11/1/07, Carl Woll <ca...@wolfram.com> wrote:
>
> sdw wrote:
>
> >Hi -
> >
> >Does anyone have a clever way to make datelistplot act like loglistplot
> and create nice log Y axis vs. dates?
> >
> >this is not the same as just logging the y variable before plotting - I
> want the Y axis to show the actual values on a log scale, not the log values
> on a linear scale
> >
> >thanks,
> >
> >Steven
> >
> >
> >
> >