3

I need to produce a scatter chart from a two-column comma-separated text file:

gnuplot> set style fill transparent solid .5 noborder
gnuplot> plot "corr.csv" using 0:1 with circles lc rgb "blue"

Here is the output:

enter image description here

However I want something like that: enter image description here

I want to scale the circles up with the values in the x-axis.

Jeff Schaller
  • 67,283
  • 35
  • 116
  • 255
sci9
  • 527

1 Answers1

3

Here's an example of scaling/increasing circle size as x values get bigger:

Sample input.dat file contents (with 2 columns):

1 1
1 2
2 3
2 4
3 3
4 3
5 4
6 4
7 7
8 4
8 5
9 5

Via command line in interactive mode:

$ gnuplot
gnuplot> set style fill transparent solid .5 noborder
gnuplot> set xrange [0:GPVAL_DATA_X_MAX]
gnuplot> set yrange [0:GPVAL_DATA_Y_MAX]
gnuplot> plot "input.dat" u 1:2:(.03*($1)) w circles lc rgb "blue"

The output: enter image description here