On Mon, 24 Aug 2020, Sven Schreiber wrote:
Am 23.08.20 um 01:43 schrieb Allin Cottrell:
> On Sat, 22 Aug 2020, Sven Schreiber wrote:
>
>> Am 18.08.2020 um 16:19 schrieb Artur Tarassow:
>>>
>>> I spotted a possible "bug" when trying to plot weekly or hourly
data
>>> over time. Take a time-series, set some frequency and check the plot.
>>> Even though the <print invest -o> command shows a correct date index,
>>> the x-axis of the plot does _not_ show any date format for weekly or
>>> hourly data. For other frequencies, things are fine.
>>
>> I agree it would be nice to also display that information in the graphs.
>
> Well-tested patches would be reviewed with interest. Otherwise, I'm
> afraid this is not a priority for me.
[moving this to devel]
This is perfectly fine, we know you are constantly working hard on many
aspects of gretl.
I have started experimenting with the sample label printing business in
the branch "samplelabel" branch on git. Certainly very far from being
well tested (actually already with a known bug where I haven't pushed
the fix yet, but will in a minute). This is not exactly the same thing
as date label printing in plots, but similar I think.
When looking at the code, I see the function 'ntodate' (in
lib/src/dataio.c) which nowadays is a little misleading I'd say, because
it is also used to construct the label for a panel observation (which
includes the unit, not just a date). So my proposal would be to adjust
that name eventually - of course this means a lot of changes to all the
calls, but with grep and search and replace this shouldn't be a big
problem. Or is there anything I'm missing?
I don't think you're missing anything. Renaming that function might
be helpful -- maybe as ntolabel or similar?
And a question: AFAICS dset->panel_pd is the time-series
frequency
within a panel dataset. (So playing the role of dset->pd in a
time-series dataset, but dset->pd is the overall time dimension length
in the panel context, cf. also the hansl accessor $pd -- I've always
found that confusing! So what actually is the hansl way to retrieve the
information about the time series frequency in a panel, after it has
been set with --set-panel-time??) My question: does this panel_pd always
exist in a panel, or only conditionally on the user action of setting it?
"panel_pd" is not much developed as yet. It's set to 0 (and
therefore never used for anything) by default, and set to non-zero
only via "setobs". Right now it's only used for plotting panel data
with a single time range -- so either a single group, or a plot with
"groups overlaid" (panplot --overlay) or a group means time series
(panplot --means). There's no user accessor for panel_pd.
One simple change that might allow greater functionality would be to
offer an accessor (say, $pantime). This could be a bundle holding
the panel_pd and the label for the first observation.
Allin