Gnuplot unrecognized option -background

Hi :wave:

I am currently getting started with acados and tried to run and understand some of the examples.
I am working with acados in C++ in the eclipse CDT IDE on a windows machine with the MinGW compiler.
I never worked with Gnuplot so excuse me if my question is not so intelligent.
I ran the code “discrete_time_rocket.cpp”. The following error appeared at the end on the console:

unrecognized option -background
line 0: Cannot load input from 'white'

Then the execution stopped and no gnuplot window opened.

I am sure that the pipe to gnuplot works and my program is able to open it, because with a modified “gnuplot_window.cpp” file gnuplot opened and showed the graphs.
I changed

gnuPipe = popen("gnuplot -persist -background white", "w");

in line 126 to:

gnuPipe = popen("gnuplot -persist", "w");

However plotting with multiple plots became weird and the figures were distorted. I really don´t know why because I couldn´t find any information on the -background white option on the internet.

A single figure in a window worked fine.

I would really appreciate if someone knows a solution how I could run gnuplot properly or just explain to me what this -background white phrase does.

Thanks a lot for your help!


Hi Dana,

first of all, welcome to the acados forum!


Is this file part of acados? I don’t know about it.

I think the question is a bit off-topic, I don’t really know how to help.

I’m sorry I thought this forum is about acado. I didn’t know that acados existed and that it is something different until I read a little more in here. The little “s” makes a huge difference.

1 Like