mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2025-01-29 10:24:51 +00:00
Adjust font size in pdf files
This commit is contained in:
parent
32dde63348
commit
d86158a94a
@ -247,7 +247,7 @@ public:
|
||||
Gnuplot& savetops(const std::string &filename = "gnuplot_output");
|
||||
|
||||
/// saves a gnuplot session to a pdf file, filename without extension
|
||||
Gnuplot& savetopdf(const std::string &filename = "gnuplot_output");
|
||||
Gnuplot& savetopdf(const std::string &filename = "gnuplot_output", unsigned int font_size = 12);
|
||||
|
||||
//----------------------------------------------------------------------------------
|
||||
// set and unset
|
||||
@ -1070,10 +1070,10 @@ Gnuplot& Gnuplot::showonscreen()
|
||||
//
|
||||
// saves a gnuplot session to a pdf file
|
||||
//
|
||||
Gnuplot& Gnuplot::savetopdf(const std::string &filename)
|
||||
Gnuplot& Gnuplot::savetopdf(const std::string &filename, unsigned int font_size)
|
||||
{
|
||||
std::ostringstream cmdstr;
|
||||
cmdstr << "set term pdfcairo enhanced color font \"Times-New-Roman,18\"\n";
|
||||
cmdstr << "set term pdfcairo enhanced color font \"Times-New-Roman," + std::to_string(font_size) + "\"\n";
|
||||
cmdstr << "set output \"" << filename << ".pdf\"\n";
|
||||
cmdstr << "replot";
|
||||
cmd(cmdstr.str());
|
||||
|
@ -617,7 +617,7 @@ void StaticPositionSystemTest::print_results(const std::vector<double> & east,
|
||||
g1.cmd("replot");
|
||||
|
||||
g1.savetops("Position_test_2D");
|
||||
g1.savetopdf("Position_test_2D");
|
||||
g1.savetopdf("Position_test_2D", 18);
|
||||
g1.showonscreen(); // window output
|
||||
|
||||
Gnuplot g2("points");
|
||||
|
@ -126,7 +126,7 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
g1.plot_xy(fft_sizes_v, execution_times, "FFT execution time (averaged over " + std::to_string(FLAGS_fft_iterations_test) + " iterations)");
|
||||
g1.set_style("points").plot_xy(powers_of_two, execution_times_powers_of_two, "Power of 2");
|
||||
g1.savetops("FFT_execution_times_extended");
|
||||
g1.savetopdf("FFT_execution_times_extended");
|
||||
g1.savetopdf("FFT_execution_times_extended", 18);
|
||||
g1.showonscreen(); // window output
|
||||
|
||||
Gnuplot g2("linespoints");
|
||||
@ -138,7 +138,7 @@ TEST(FFTLengthTest, MeasureExecutionTime)
|
||||
g2.plot_xy(fft_sizes_v, execution_times, "FFT execution time (averaged over " + std::to_string(FLAGS_fft_iterations_test) + " iterations)");
|
||||
g2.set_style("points").plot_xy(powers_of_two, execution_times_powers_of_two, "Power of 2");
|
||||
g2.savetops("FFT_execution_times");
|
||||
g2.savetopdf("FFT_execution_times");
|
||||
g2.savetopdf("FFT_execution_times", 18);
|
||||
g2.showonscreen(); // window output
|
||||
}
|
||||
catch (GnuplotException ge)
|
||||
|
Loading…
Reference in New Issue
Block a user