mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-17 12:43:01 +00:00
Add persist to gnuplot terminal
This commit is contained in:
parent
e006b66f51
commit
19b280e089
@ -1050,7 +1050,7 @@ Gnuplot& Gnuplot::set_smooth(const std::string &stylestr)
|
||||
Gnuplot& Gnuplot::showonscreen()
|
||||
{
|
||||
cmd("set output");
|
||||
cmd("set terminal " + Gnuplot::terminal_std);
|
||||
cmd("set terminal " + Gnuplot::terminal_std + " persist");
|
||||
|
||||
return *this;
|
||||
}
|
||||
@ -1062,10 +1062,8 @@ Gnuplot& Gnuplot::showonscreen()
|
||||
//
|
||||
Gnuplot& Gnuplot::savetops(const std::string &filename)
|
||||
{
|
||||
cmd("set terminal postscript color");
|
||||
|
||||
std::ostringstream cmdstr;
|
||||
cmdstr << "set term postscript\n";
|
||||
cmdstr << "set term postscript landscape enhanced color dashed \"Times-Roman\" 18\n";
|
||||
cmdstr << "set output \"" << filename << ".ps\"\n";
|
||||
cmdstr << "replot";
|
||||
cmd(cmdstr.str());
|
||||
|
@ -46,26 +46,10 @@
|
||||
|
||||
|
||||
DEFINE_int32(fft_iterations_test, 1000, "Number of averaged iterations in FFT length timing test");
|
||||
DEFINE_bool(plot_fft_length_test, false, "Plots results of FFTLengthTest");
|
||||
|
||||
|
||||
class FFTLengthTest: public ::testing::Test
|
||||
{
|
||||
public:
|
||||
void wait_for_key();
|
||||
};
|
||||
|
||||
|
||||
void FFTLengthTest::wait_for_key()
|
||||
{
|
||||
std::cout << std::endl << "Press ENTER to continue..." << std::endl;
|
||||
|
||||
std::cin.clear();
|
||||
std::cin.ignore(std::cin.rdbuf()->in_avail());
|
||||
std::cin.get();
|
||||
return;
|
||||
}
|
||||
DEFINE_bool(plot_fft_length_test, false, "Plots results of FFTLengthTest with gnuplot");
|
||||
|
||||
// Note from FFTW documentation: the standard FFTW distribution works most efficiently for arrays whose
|
||||
// size can be factored into small primes (2, 3, 5, and 7), and otherwise it uses a slower general-purpose routine.
|
||||
|
||||
TEST_F(FFTLengthTest, MeasureExecutionTime)
|
||||
{
|
||||
@ -160,9 +144,6 @@ TEST_F(FFTLengthTest, MeasureExecutionTime)
|
||||
g2.set_style("points").plot_xy(powers_of_two, execution_times_powers_of_two, "Power of 2");
|
||||
g2.savetops("FFT_execution_times");
|
||||
g2.showonscreen(); // window output
|
||||
#if !defined __APPLE__
|
||||
wait_for_key();
|
||||
#endif
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user