Description
Bug category
I don't know whether it's a warning or an error.
- bug - runtime error
- bug - runtime warning
Describe the bug
In Windows 10, I use CMake to install matplot++ and install gnuplot 5.4.4 on its website. I've chosen wxt as default when installing. I just ran the example code:
#include <cmath>
#include <matplot/matplot.h>
int main() {
using namespace matplot;
std::vector<double> x = linspace(0, 2 * pi);
std::vector<double> y1 = transform(x, [](auto x) { return sin(x); });
std::vector<double> y2 = transform(x, [](auto x) { return sin(x - 0.25); });
std::vector<double> y3 = transform(x, [](auto x) { return sin(x - 0.5); });
plot(x, y1, x, y2, "--", x, y3, ":");
show();
return 0;
}
However, the cmd Terminal prompts several lines:
gnuplot> se
line 0: unrecognized option - see 'help set'.
gnuplot> t terminal wxt title "Figure 1" size 560,420 enhanced font "Sans,10"
line 0: invalid command
gnuplot> se
line 0: unrecognized option - see 'help set'. gnuplot> t terminal wxt title "Figure 1" size 560,420 enhanced font "Sans,10"
line 0: invalid command
gnuplot> se
line 101: unrecognized option - see 'help set'.
gnuplot> t terminal wxt title "Figure 1" size 560,420 enhanced font "Sans,10"
line 101: invalid command
gnuplot> se
line305: unrecognized option - see 'help set'.
gnuplot> t terminal wxt title "Figure 1" size 560,420 enhanced font "Sans,10"
line 305: invalid command
gnuplot> se
line 612: unrecognized option - see 'help set'.
gnuplot> t terminal wxt title "Figure 1" size 560,420 enhanced font "Sans,10"
line 612: invalid command
It's definitely NOT your intention to produce such lines when running example code. This is also mentioned in issue #243 and discussion #267 ,and both of them have been reported for a long time without ANY valid solution. Besides, when running this code, the plot screen will also flash several times, and I suspect that's related with the error/warning info. The final plot is right, but that's a miserable course to get lots of weird output and flashes to just get one plot.
I regard this project as an alternative to python's matplotlib, so hopefully you can do better and better.
Steps to Reproduce
I've mentioned above.
Platform
- cross-platform issue - windows
Environment Details:
- OS: Windows 10
- OS Version: 21H1
- Compiler: msvc
- Compiler version: 19.29