Hi all,
I am writing to propose a new feature enhancement for the gnuplot and tsplots commands. Both these commands currently accept a matrix datatype - a feature that's been highly useful. However, the requirement to specify which columns to be shown seems to reduce the overall flexibility of these commands.
Current Scenario:
As it stands, users need to explicitly specify the sequence of columns they wish to plot when using the gnuplot and tsplots commands. This can be a limitation in scenarios where users want to plot all columns or where the number of columns is dynamic or not known in advance.
Proposed Enhancement:
To enhance the flexibility and usability of these commands, I propose the following default behavior: if no sequence of columns to plot is provided, automatically all the columns should be plotted.
Example:
set verbose off
open denmark -q
matrix m = {dataset}
tsplots --matrix=m --output=display
Alternative 1
Introduce some new keyword all:
tsplots all --matrix=m --output=display
Alternative 2
Allow for end keyword which can be used for matrix slicing already:
tsplots 1..end --matrix=m --output=display
Benefits:
This enhancement would provide increased flexibility for users and streamline the process of creating plots, especially when dealing with large or dynamic datasets. It would eliminate the need for users to manually specify each column, thereby improving the user experience and efficiency.
Thanks,
Artur
just fixing a typo in the title
For the "gnuplot" command there already exist similar defaults, see the documentation. (Plot everything against the last column, or with --time-series plot all columns against time. -- However, for the time series case the resulting x-axis does not seem to carry time information, at least that's what I'm (not) seeing here in the context of the denmark dataset. Not sure if that's intended. )
The doc for "scatters" says you can omit the column numbers, but somehow this doesn't work for me; example:
which gives an "insufficient arguments" error here for me. Is this a bug?
Since "tsplots" builds on "scatters", I guess nothing is working there yet, either.
I guess you mean:
Also for me, the plot does not carry the time information.
Both of these points are now fixed in git. The
scattersandtsplotscommands do not require column-lists when matrix data are provided, and thegnuplotcommand with matrix input and the--time-seriesoption gets time information for the x-axis from the dataset, if a dataset is present and the row dimension of the data matrix matches either the length of the dataset or the length of the current sample range.