Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Frida
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mlz
Frida
Commits
8b099039
Commit
8b099039
authored
7 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
corr names for 2D case
parent
4e546322
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
pub/plot/dualplot.cpp
+20
-6
20 additions, 6 deletions
pub/plot/dualplot.cpp
pub/plot/dualplot.hpp
+3
-1
3 additions, 1 deletion
pub/plot/dualplot.hpp
pub/plot/ps_plotter.cpp
+11
-7
11 additions, 7 deletions
pub/plot/ps_plotter.cpp
with
34 additions
and
14 deletions
pub/plot/dualplot.cpp
+
20
−
6
View file @
8b099039
...
...
@@ -24,18 +24,32 @@ using std::cout;
CPlot
::
CPlot
(
int
_iPlot
,
bool
_logx
,
bool
_logy
,
bool
_p2D
,
bool
_logz
)
:
iPlot
(
_iPlot
)
,
p2D
(
_p2D
)
,
X
(
"x"
,
_logx
)
,
Y
(
"y"
,
_logy
)
,
Z
(
"
z
"
,
_logz
)
,
Z
(
"
UNUSED
"
,
_logz
)
,
maxpoints
(
20000
)
,
with_errors
(
true
)
,
equipoints
(
120
)
,
refine
(
true
)
,
gnuPlotter
(
new
CGnuPlotter
(
iPlot
))
,
ps_Plotter
(
new
CPS_Plotter
)
{}
{
set_dims
(
_p2D
);
}
//! Sets 1D or 2D; sets axis names accordingly.
void
CPlot
::
set_dims
(
const
bool
_p2D
)
{
p2D
=
_p2D
;
if
(
p2D
)
{
Y
.
name
=
"h"
;
Z
.
name
=
"y"
;
}
else
{
Y
.
name
=
"y"
;
Z
.
name
=
"UNUSED"
;
}
}
//! Change one setup parameter per command.
...
...
@@ -88,11 +102,11 @@ void CPlot::set_aux(const string& cmd)
with_errors
=
false
;
else
if
(
cmd
==
"gt"
)
p2D
=
!
p2D
;
set_dims
(
!
p2D
)
;
else
if
(
cmd
==
"gt+"
)
p2D
=
true
;
set_dims
(
true
)
;
else
if
(
cmd
==
"gt-"
)
p2D
=
false
;
set_dims
(
false
)
;
else
throw
"unknown command "
+
cmd
;
...
...
This diff is collapsed.
Click to expand it.
pub/plot/dualplot.hpp
+
3
−
1
View file @
8b099039
...
...
@@ -34,6 +34,9 @@ public:
int
equipoints
;
//!< Start curve plot with this # grid points.
bool
refine
;
//!< Refine curve plot when appropriate?
void
set_dims
(
const
bool
_p2D
);
void
set_aux
(
const
std
::
string
&
cmd
);
void
gp_write
(
const
std
::
string
&
in
);
void
start_frame1D
(
const
std
::
string
&
caller
,
const
std
::
string
&
xlabel
,
const
std
::
string
&
ylabel
);
...
...
@@ -53,7 +56,6 @@ public:
void
write_postscript
(
const
std
::
string
&
fname
,
const
std
::
string
&
mode
,
const
bool
withDefs
,
std
::
map
<
const
std
::
string
,
std
::
string
>&&
settings
);
void
set_aux
(
const
std
::
string
&
cmd
);
std
::
string
info
()
const
;
private
:
...
...
This diff is collapsed.
Click to expand it.
pub/plot/ps_plotter.cpp
+
11
−
7
View file @
8b099039
...
...
@@ -165,21 +165,25 @@ namespace {
ret
+=
"[
\n
"
;
if
(
A
->
logflag
&&
(
Tacks
[
0
]
<
1e-3
||
Tacks
[
ntack
-
1
]
>
1e3
))
{
for
(
int
i
=
0
;
i
<
ntack
;
i
++
)
ret
+=
str
(
format
(
" %9.6f {(10)(%i)sp()} %%{(%g)}
\n
"
)
%
A
->
pc
(
Tacks
[
i
])
ret
+=
str
(
format
(
" %g w%s {(10)(%i)sp()} %%{(%g)}
\n
"
)
%
(
float
)
Tacks
[
i
]
%
A
->
name
%
(
int
)(
log10
(
Tacks
[
i
]))
%
(
float
)
Tacks
[
i
]);
}
else
{
for
(
int
i
=
0
;
i
<
ntack
;
i
++
)
ret
+=
str
(
format
(
" %9.6f {(%g)}
\n
"
)
%
A
->
pc
(
Tacks
[
i
])
ret
+=
str
(
format
(
" %g w%s {(%g)}
\n
"
)
%
(
float
)
Tacks
[
i
]
%
A
->
name
%
(
float
)
Tacks
[
i
]);
}
ret
+=
" ] SetTacVec
\n
"
;
}
ret
+=
str
(
format
(
"%g %g %i %i SetTicVec%s
\n
"
)
%
A
->
pc
(
ticklim
[
0
])
%
A
->
pc
(
ticklim
[
1
])
ret
+=
str
(
format
(
"%g w%s %g w%s %i %i SetTicVec%s
\n
"
)
%
(
float
)
ticklim
[
0
]
%
A
->
name
%
(
float
)
ticklim
[
1
]
%
A
->
name
%
(
ntack
+
2
)
%
ntpt
%
(
A
->
logflag
?
"Log"
:
"Lin"
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment