Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
dql
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
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
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Descartes Research
dql
Commits
92a6d47a
Commit
92a6d47a
authored
6 years ago
by
Jürgen Walter
Browse files
Options
Downloads
Patches
Plain Diff
fixed histogram
parent
2c179039
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools.descartes.pavo/src/tools/descartes/pavo/types/Historgram.java
+8
-23
8 additions, 23 deletions
...artes.pavo/src/tools/descartes/pavo/types/Historgram.java
with
8 additions
and
23 deletions
tools.descartes.pavo/src/tools/descartes/pavo/types/Historgram.java
+
8
−
23
View file @
92a6d47a
...
...
@@ -53,13 +53,11 @@ import tools.descartes.pavo.result.ResultContainerPavo;
import
tools.descartes.pavo.result.SeriesResultPavo
;
/**
* Class to visualise the current result as Histogram if possible. Can visualise
* results constiting only out of series results. If the y axis descrition is
* "Frequency" the y values will be used as count for the x values. Removing the
* Class to visualize the current series results as histogram. Removes the
* confidence button and adding a spinner for the choice of number of bins
* buttons
*
* @author Maximilian König <max.c.koenig@t-online.de>
* @author Jrgen Walter <juergen.walter@uni-wuerzburg.de>
* @author Maximilian Knig <max.c.koenig@t-online.de>
* @since 2016
*/
public
class
Historgram
extends
AbstractVisualizationType
implements
IVisualizationType
{
...
...
@@ -84,24 +82,11 @@ public class Historgram extends AbstractVisualizationType implements IVisualizat
for
(
AbstractQuantitativeResult
r
:
this
.
getResult
().
getResults
())
{
if
(
r
instanceof
SeriesResultPavo
)
{
LinkedList
<
Double
>
list
=
new
LinkedList
<>();
if
(
r
.
getScaleY
().
equals
(
"Frequency"
))
{
for
(
int
j
=
0
;
j
<
((
SeriesResultPavo
)
r
).
getValues
().
size
();
j
++)
{
Double
a
=
((
SeriesResultPavo
)
r
).
getValues
().
get
(
j
).
getY
();
while
(
a
>
0
)
{
list
.
add
(((
SeriesResultPavo
)
r
).
getValues
().
get
(
j
).
getX
());
a
--;
}
}
}
else
{
for
(
int
i
=
0
;
i
<
((
SeriesResultPavo
)
r
).
getValues
().
size
();
i
++)
{
list
.
add
(((
SeriesResultPavo
)
r
).
getValues
().
get
(
i
).
getX
());
}
for
(
int
i
=
0
;
i
<
((
SeriesResultPavo
)
r
).
getValues
().
size
();
i
++)
{
list
.
add
(((
SeriesResultPavo
)
r
).
getValues
().
get
(
i
).
getY
());
}
double
[]
array
=
new
double
[
list
.
size
()];
for
(
int
i
=
0
;
i
<
list
.
size
();
i
++)
{
array
[
i
]
=
list
.
get
(
i
);
// Watch out for
...
...
@@ -111,8 +96,8 @@ public class Historgram extends AbstractVisualizationType implements IVisualizat
}
}
String
xaxis
=
this
.
get
X
Description
();
String
yaxis
=
this
.
getYDescription
()
;
String
xaxis
=
this
.
get
Y
Description
();
String
yaxis
=
"Frequency"
;
JFreeChart
chart
=
ChartFactory
.
createHistogram
(
""
,
xaxis
,
yaxis
,
dataset
,
PlotOrientation
.
VERTICAL
,
false
,
false
,
false
);
XYPlot
plot
=
(
XYPlot
)
chart
.
getPlot
();
...
...
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