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

make consequential use of axis names.

previous commits:
use wx, wy, wh in setting ticks and tacks
parent 8b099039
No related branches found
No related tags found
No related merge requests found
......@@ -25,8 +25,8 @@ using boost::format;
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 char a);
string ps_coord(const CAxis* A);
string ps_axis(const CAxis* A);
string ps_horiz(const string& label);
string ps_verti(const string& label);
string ps_colorscale(const string& label);
......@@ -50,11 +50,11 @@ void CPS_Plotter::start_frame1D(
ps_snum = 0;
ps_Doc = "";
ps_accu = "\n%% output created by " + caller + "\n\n";
ps_accu += ps_coord(X, 'x');
ps_accu += ps_coord(Y, 'y');
ps_accu += ps_coord(X);
ps_accu += ps_coord(Y);
ps_accu += "\n";
ps_accu += ps_axis(X, 'x') + ps_horiz(xlabel);
ps_accu += ps_axis(Y, 'y') + ps_verti(ylabel);
ps_accu += ps_axis(X) + ps_horiz(xlabel);
ps_accu += ps_axis(Y) + ps_verti(ylabel);
ps_accu += "\n";
}
......@@ -68,9 +68,9 @@ void CPS_Plotter::start_frame2D(
ps_snum = 0;
ps_Doc = "";
ps_accu = "\n%% output created by " + caller + "\n\n";
ps_accu += ps_coord(X, 'x');
ps_accu += ps_coord(Z, 'y');
ps_accu += ps_coord(Y, 'h');
ps_accu += ps_coord(X);
ps_accu += ps_coord(Z);
ps_accu += ps_coord(Y);
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, 'x') + ps_horiz(xlabel);
ps_accu += ps_axis(Z, 'y') + ps_verti(zlabel);
ps_accu += ps_axis(Y, 'h') + ps_colorscale(ylabel);
ps_accu += ps_axis(X) + ps_horiz(xlabel);
ps_accu += ps_axis(Z) + ps_verti(zlabel);
ps_accu += ps_axis(Y) + ps_colorscale(ylabel);
}
void CPS_Plotter::add_spec(
......@@ -190,18 +190,19 @@ namespace {
return ret;
}
string ps_coord(const CAxis* A, const char a)
string ps_coord(const CAxis* A)
{
return str(format("%1i %12.4g %12.4g %cSetCoord\n") % A->logflag % A->inf % A->sup % a);
return str(format("%1i %12.4g %12.4g %cSetCoord\n")
% A->logflag % A->inf % A->sup % A->name);
}
string ps_axis(const CAxis* A, const char a)
string ps_axis(const CAxis* A)
{
string ret;
int ntpt;
double ticklim[2];
vector<double> Tacks;
ret += "% " + string(1,a) + " axis:\n";
ret += "% " + A->name + " axis:\n";
if (A->logflag && A->inf <= 0)
throw "BUG: log incompatible with limits " + A->str();
A->calc_ticks(Tacks, &ntpt, ticklim);
......
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