I have a data file file.dat
arranged in this format:
DataA:
0 2
1 3
7 2
1 2
DataB:
3 2
6 4
1 1
I want to get 2 plots from this data file.
- a simple plot of these points.
- A plot of number of points in each data sets. e.g (DataA has 4 points and DataB has 3 points)
For generating the first plot I am using this
set key autotitle columnheader right
plot for [i=0:1] 'file.dat' using 1:2 index i with lp
For the other plot I just want a simple bar chart like this:
Where y-axis
tells the number of points DataA and DataB have.
I don't understand how to count the points present in the list, simultaneously plotting the data set too.
P.S Can I also get both of the plots side by side?
EDIT:
The file.dat
can contain multiple datas. e.g
DataA:
0 2
1 3
7 2
1 2
.
.
.
DataZ:
3 2
6 4