0

I am following plot bar graphs in Gnuplot but I am not able to plot my data. Here is how it should look like

Result Graph

Here is my code

!/usr/bin/gnuplot -persist

  
set boxwidth 0.5
set style fill solid

plot  (1,"label1",664;2,"label2",331) using 1:3:xtic(2) with boxes

Error

plot  (1,"label1",664;2,"label2",331) using 1:3:xtic(2) with boxes
                     ^
"./test.sh", line 10: ')' expected
user2065276
  • 313
  • 2
  • 16
tulamba
  • 119
  • 11

1 Answers1

2

Use a data block for saving online data

$data <<EOD
1 "label" 664
2 "label2" 331
EOD

set boxwidth 0.5
set style fill solid

plot  $data using 1:3:xtic(2) with boxes
Christoph
  • 47,569
  • 8
  • 87
  • 187