Skip to content
Snippets Groups Projects
Commit 4e546322 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

simplifyPS file: xlabel directly followed by xCL, &c

parent 28a1411e
No related branches found
No related tags found
No related merge requests found
......@@ -26,10 +26,10 @@ namespace {
string ps_ticktack(
const vector<double>& Tacks, const int ntpt, const double* ticklim, const CAxis* A);
string ps_coord(const CAxis* A, const char a);
string ps_axis(const CAxis* A, const string& label, const char a);
string ps_horiz();
string ps_verti();
string ps_colorscale();
string ps_axis(const CAxis* A, const char a);
string ps_horiz(const string& label);
string ps_verti(const string& label);
string ps_colorscale(const string& label);
string ps_slice_header(
bool as_line, int slice_no, int style_no, const vector<string>& zentries,
const string& xco, const string& yco);
......@@ -53,8 +53,8 @@ void CPS_Plotter::start_frame1D(
ps_accu += ps_coord(X, 'x');
ps_accu += ps_coord(Y, 'y');
ps_accu += "\n";
ps_accu += ps_axis(X, xlabel, 'x') + ps_horiz();
ps_accu += ps_axis(Y, ylabel, 'y') + ps_verti();
ps_accu += ps_axis(X, 'x') + ps_horiz(xlabel);
ps_accu += ps_axis(Y, 'y') + ps_verti(ylabel);
ps_accu += "\n";
}
......@@ -81,9 +81,9 @@ void CPS_Plotter::close_frame2D(
ps_accu += "/linsetTic {white 1 setline} def\n";
ps_accu += "/linsetTac {white 1.3 setline} def\n\n";
ps_accu += ps_axis(X, xlabel, 'x') + ps_horiz();
ps_accu += ps_axis(Z, zlabel, 'y') + ps_verti();
ps_accu += ps_axis(Y, ylabel, 'h') + ps_colorscale();
ps_accu += ps_axis(X, 'x') + ps_horiz(xlabel);
ps_accu += ps_axis(Z, 'y') + ps_verti(zlabel);
ps_accu += ps_axis(Y, 'h') + ps_colorscale(ylabel);
}
void CPS_Plotter::add_spec(
......@@ -191,7 +191,7 @@ namespace {
return str(format("%1i %12.4g %12.4g %cSetCoord\n") % A->logflag % A->inf % A->sup % a);
}
string ps_axis(const CAxis* A, const string& label, const char a)
string ps_axis(const CAxis* A, const char a)
{
string ret;
int ntpt;
......@@ -202,27 +202,26 @@ namespace {
throw "BUG: log incompatible with limits " + A->str();
A->calc_ticks(Tacks, &ntpt, ticklim);
ret += ps_ticktack(Tacks, ntpt, ticklim, A);
ret += "{(" + label + ")}\n";
return ret;
}
string ps_horiz()
string ps_horiz(const string& label)
{
return
" 0 10 0 0 0 90 OneAxx Axx Tic Tac xNumL %% low x axis\n"
" 0 10 0 10 0 270 OneAxx Axx Tic Tac %% top x axis\n"
"xCL\n\n";
"{(" + label + ")} xCL\n\n";
}
string ps_verti()
string ps_verti(const string& label)
{
return
" 0 10 0 0 90 0 OneAxx Axx Tic Tac yNumL %% left y axis\n"
" 0 10 10 0 90 180 OneAxx Axx Tic Tac %% right y axis\n"
"yCL\n\n";
"{(" + label + ")} yCL\n\n";
}
string ps_colorscale()
string ps_colorscale(const string& label)
{
return
"ColorLegend\n"
......@@ -230,7 +229,7 @@ namespace {
" hxlow hxhig 0 10 0 90 OneAxx Axx %% low x line\n"
" 0 10 hxlow 0 90 0 OneAxx Tic Tac Axx %% left y axis\n"
" 0 10 hxhig 0 90 180 OneAxx Tic Tac Axx yNumH %% right y axis\n"
"hxhig YCH\n\n";
"{(" + label + ")} hxhig YCH\n\n";
}
string ps_slice_header(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment