Menu

#205 enhancements to "gnuplot" and "tsplots" Commands for Matrix Datatype

None
closed
nobody
None
4
2024-01-18
2024-01-11
No

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

Discussion

  • Sven Schreiber

    Sven Schreiber - 2024-01-11
    • summary: nhancements to "gnuplot" and "tsplots" Commands for Matrix Datatype --> enhancements to "gnuplot" and "tsplots" Commands for Matrix Datatype
    • Group: -->
     
  • Sven Schreiber

    Sven Schreiber - 2024-01-11

    just fixing a typo in the title

     
    👍
    1
  • Sven Schreiber

    Sven Schreiber - 2024-01-11

    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:

    open denmark
    matrix m = {LRM} ~ {LRY}
    scatters --matrix=m --output=display
    

    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.

     
    • Artur Tarassow

      Artur Tarassow - 2024-01-12

      I guess you mean:

      open denmark
      matrix m = {LRM} ~ {LRY}
      gnuplot --matrix=m --time-series --with-lines --output=display
      

      Also for me, the plot does not carry the time information.

       
  • Allin Cottrell

    Allin Cottrell - 2024-01-18

    Both of these points are now fixed in git. The scatters and tsplots commands do not require column-lists when matrix data are provided, and the gnuplot command with matrix input and the --time-series option 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.

     
    👍
    1
  • Allin Cottrell

    Allin Cottrell - 2024-01-18
    • status: open --> closed
     

Log in to post a comment.