Use row number for x-axis in plot

iason
iason New Altair Community Member
edited November 5 in Community Q&A
Is it possible to use the row number as the x-axis variable when plotting data tables?
Alternatively, a series plot with points instead of lines would give the same result.
An other alternative would be to create an attribute that gets the value of the row.

Unfortunately I don't know how to do any of the above. Any help would be much appreciated.

As a last resort, the R extension could be used but the plot wouldn't be "interactive".
Tagged:

Answers

  • MariusHelf
    MariusHelf New Altair Community Member
    If your example set does not contain an id attribute, you could use the Generate ID operator to create an attribute with ascending integer numbers.

    Cheers, Marius