stappy23
stappy23

Reputation: 21

GNUPLot: scale and plot data to specific range

I want to plot a data set to a specific range. So if for example my data has 1000 rows, then I want to plot the whole data to an xrange 1:5. Now I can't to this with the set xrange command because this simply would plot the first 5 rows, but I want the whole data scaled down to the 1:5 range. How can I do this?

Upvotes: 2

Views: 658

Answers (1)

DragonHu
DragonHu

Reputation: 244

As @sweber pointed out, you may actually talk about rows but not columns. You can get the number of records (rows) using the command stats 'datafile.dat' using 1. The variable STATS_records reports the total number of in-range data records. In addition, you can get the maximum (STATS_max) and minimum (STATS_min) of the x axis. Type help stats to see more information.

Upvotes: 2

Related Questions