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
Coenen, Joachim
Frida
Commits
f9f7b376
Commit
f9f7b376
authored
15 years ago
by
Wuttke, Joachim
Browse files
Options
Downloads
Patches
Plain Diff
corr: intercept out-of-range points; implement 'force'
parent
f1a26514
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
pub/src/dualplot.cpp
+7
-1
7 additions, 1 deletion
pub/src/dualplot.cpp
pub/src/dualplot.h
+1
-1
1 addition, 1 deletion
pub/src/dualplot.h
pub/src/edif.cpp
+26
-10
26 additions, 10 deletions
pub/src/edif.cpp
pub/src/frida2.cpp
+1
-0
1 addition, 0 deletions
pub/src/frida2.cpp
with
35 additions
and
12 deletions
pub/src/dualplot.cpp
+
7
−
1
View file @
f9f7b376
...
...
@@ -379,8 +379,14 @@ void CPlot::Line( const bool as_line, const int style_no,
FILE
*
gp_fd
;
if
(
!
(
gp_fd
=
fopen
(
gp_fnam
,
"w"
)))
throw
string
(
"cannot save gnuplot data to "
)
+
gp_fnam
;
for
(
uint
i
=
0
;
i
<
np
;
i
++
)
for
(
uint
i
=
0
;
i
<
np
;
i
++
){
// invalid points should be intercepted outside Line(..)
if
(
xp
[
i
]
<
X
.
R
.
inf
||
xp
[
i
]
>
X
.
R
.
sup
)
throw
"Plot::Line: x["
+
strg
(
i
)
+
"]="
+
strg
(
xp
[
i
])
+
" out of range"
;
if
(
yp
[
i
]
<
Y
.
R
.
inf
||
yp
[
i
]
>
Y
.
R
.
sup
)
throw
"Plot::Line: y["
+
strg
(
i
)
+
"]="
+
strg
(
yp
[
i
])
+
" out of range"
;
fprintf
(
gp_fd
,
"%16.8g %16.8g
\n
"
,
xp
[
i
],
yp
[
i
]);
}
fclose
(
gp_fd
);
// Live display:
...
...
This diff is collapsed.
Click to expand it.
pub/src/dualplot.h
+
1
−
1
View file @
f9f7b376
...
...
@@ -27,7 +27,7 @@ class CAxis {
bool
log
;
bool
force
;
CAxis
(
bool
_log
)
:
log
(
_log
)
{};
CAxis
(
bool
_log
)
:
log
(
_log
)
,
force
(
false
)
{};
void
Ask
(
const
string
&
quest
);
void
SetLog
(
const
bool
_log
);
...
...
This diff is collapsed.
Click to expand it.
pub/src/edif.cpp
+
26
−
10
View file @
f9f7b376
...
...
@@ -1114,21 +1114,37 @@ void NEdif::Plot( CPlot *plot, bool add )
size_t
np
=
0
,
nxl
=
0
,
nxh
=
0
,
nyl
=
0
,
nyh
=
0
;
vector
<
double
>
xp
,
yp
;
for
(
size_t
i
=
0
;
i
<
n
;
i
++
)
{
if
(
!
plot
->
X
.
force
&&
!
plot
->
X
.
R
.
contained
(
s
->
x
[
i
])
)
{
if
(
s
->
x
[
i
]
<=
plot
->
X
.
R
.
inf
)
nxl
++
;
if
(
s
->
x
[
i
]
>=
plot
->
X
.
R
.
sup
)
nxh
++
;
continue
;
double
x
=
s
->
x
[
i
];
if
(
!
plot
->
X
.
R
.
contained
(
x
)
)
{
if
(
x
<=
plot
->
X
.
R
.
inf
){
x
=
plot
->
X
.
R
.
inf
;
nxl
++
;
}
if
(
x
>=
plot
->
X
.
R
.
sup
){
x
=
plot
->
X
.
R
.
sup
;
nxh
++
;
}
if
(
!
plot
->
X
.
force
)
continue
;
}
if
(
!
plot
->
Y
.
force
&&
!
plot
->
Y
.
R
.
contained
(
s
->
y
[
i
])
)
{
if
(
s
->
y
[
i
]
<=
plot
->
Y
.
R
.
inf
)
nyl
++
;
if
(
s
->
y
[
i
]
>=
plot
->
Y
.
R
.
sup
)
nyh
++
;
continue
;
double
y
=
s
->
y
[
i
];
if
(
!
plot
->
Y
.
R
.
contained
(
y
)
)
{
if
(
y
<=
plot
->
Y
.
R
.
inf
){
y
=
plot
->
Y
.
R
.
inf
;
nyl
++
;
}
if
(
y
>=
plot
->
Y
.
R
.
sup
){
y
=
plot
->
Y
.
R
.
sup
;
nyh
++
;
}
if
(
!
plot
->
Y
.
force
)
continue
;
}
if
(
np
==
plot
->
maxpoints
&&
np
<
n
)
{
printf
(
"reached maxpoints at %g
\n
"
,
s
->
x
[
i
]);
}
xp
.
push_back
(
s
->
x
[
i
]
);
yp
.
push_back
(
s
->
y
[
i
]
);
xp
.
push_back
(
x
);
yp
.
push_back
(
y
);
np
=
xp
.
size
();
if
(
np
>
plot
->
maxpoints
)
// continue in large steps
i
+=
plot
->
maxpoints
;
...
...
This diff is collapsed.
Click to expand it.
pub/src/frida2.cpp
+
1
−
0
View file @
f9f7b376
...
...
@@ -263,6 +263,7 @@ int main()
" gp plot to complete .ps file
\n
"
" gf plot to short .psX file
\n
"
" gl list of plot windows
\n
"
" g<n> switch to plot window <n>
\n
"
" gd dialog (within gnuplot)
\n
"
" p plot
\n
"
" pp plot with new autoranges
\n
"
...
...
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