0

Ive installed GNUplot on OSX using

brew install gnuplot 

in terminal. I can open gnuplot using

gnuplot

in terminal. I then use

set terminal png

But then if I try to plot anything I just get random characters printed to the screen.

e.g

plot sin(x)/x

returns

     Q%@??L?r??T?   89??? ?v?*?`"?Ө~???;???o.?/???jk??W}???f??C8???rR??2j??        GE?e.?fJ??zv!S?f]|???=?^<}?Bq?m??
    ^<??C&G{nR?Ũ?"~?(YA@?????ϱ??????yd?В->桮???o??~??*-R??m???Q??????Я??=?
    ң?9????(Z<?C]???߫???\?wH??Ѧ??(Z?C_???ww???w??ǣ??txE??y???F??q%?n??Q???ǁ|????(Z???X@???V??q3????Pӣ??y?y?e?p???EHK?y????xj?l7?{ݟ?g?1BG?Q?8???g/oD??k#g??h?1}=?n????:????<?????
           ??Ń'?IEND?B`?gnuplot> 

The same thing happens if I set the terminal to jpeg.

1 Answer 1

2

gnuplot just prints the contents of a png file that you want to create. You should specify the file name:

set output "myfile.png" 
Sign up to request clarification or add additional context in comments.

1 Comment

Great! Thanks very much.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.