Skip to content

Commit

Permalink
Titel in signatur Aufnehmen.
Browse files Browse the repository at this point in the history
  • Loading branch information
kt86 committed Jan 17, 2025
1 parent 004067c commit 1d1f883
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
22 changes: 9 additions & 13 deletions src/main/java/org/tub/vsp/bvwp/users/kmt/FiguresKMT.java
Original file line number Diff line number Diff line change
Expand Up @@ -351,12 +351,10 @@ static Figure createFigureNkvChange(Table table, String yName, String yName2) {
}

/**
* Für NKV vergleich-Plot mit 2 Y-Achsen.
* Für NKV vergleich-Plot mit 3 Kurven.
* */
static Figure createFigureNkvChange(Table table, String xName, String yName1, String yName2, String yName3, String yAxisName) {
static Figure createFigureNkvChange(Table table, String title, String xName, String yName1, String yName2, String yName3, String yAxisName) {

// String xName = Headers.NKV_NO_CHANGE;
// String yName = Headers.NKV_CO2;
double maxX = 20.;
double maxY = 20.;

Expand All @@ -365,7 +363,7 @@ static Figure createFigureNkvChange(Table table, String xName, String yName1, St
.range(0., maxX)
.build();

table = table.sortDescendingOn(HeadersKN.NKV_ORIG);
table = table.sortDescendingOn(xName);

Axis yAxis = Axis.builder().type(Type.LINEAR)
.range(Double.min(0., 1.1 * table.numberColumn(yName1).min()), maxY)
Expand All @@ -377,7 +375,7 @@ static Figure createFigureNkvChange(Table table, String xName, String yName1, St
.title(yName2)
.build();

Layout layout = Layout.builder(yName1 + " and " + yName2 + " over " + HeadersKN.NKV_ORIG)
Layout layout = Layout.builder(title)
.xAxis(xAxis)
.yAxis(yAxis)
.yAxis2(yAxis2)
Expand All @@ -402,33 +400,31 @@ static Figure createFigureNkvChange(Table table, String xName, String yName1, St
.marker(Marker.builder().color("orange").build())
.build();

// double[] xx = new double[]{0., 1.1* table.numberColumn( xName ).max() };
// double[] yy = new double[]{0., 1.1* table.numberColumn( xName ).max()};
double[] xx = new double[] {0., maxX};
double[] yy = new double[] {0., maxY};
double[] xy1 = new double[] {1., 1.};

Trace diagonale = getDiagonalTrace(xx, yy, "magenta");

Trace horizontalCbr1 = ScatterTrace.builder(xx, xy1)
Trace horizontalEq1 = ScatterTrace.builder(xx, xy1)
.name("horizontal = 1")
.mode(Mode.LINE)
.marker(Marker.builder().color("gray").build())
.build();

Trace verticalCbr1 = ScatterTrace.builder(xy1, yy)
Trace verticalEq1 = ScatterTrace.builder(xy1, yy)
.name("vertical = 1")
.mode(Mode.LINE)
.marker(Marker.builder().color("gray").build())
.build();

return new Figure(layout, y1overX, y2overX, y3overX, diagonale, horizontalCbr1, verticalCbr1);
return new Figure(layout, y1overX, y2overX, y3overX, diagonale, horizontalEq1, verticalEq1);
}

/**
* Für NKV vergleich-Plot mit 2 Y-Achsen.
* */
static Figure createFigureElaChange(Table table, String xName, String yName1, String yName2, String yName3, String yAxisName) {
static Figure createFigureElaChange(Table table, String title, String xName, String yName1, String yName2, String yName3, String yAxisName) {

// String xName = Headers.NKV_NO_CHANGE;
// String yName = Headers.NKV_CO2;
Expand Down Expand Up @@ -461,7 +457,7 @@ static Figure createFigureElaChange(Table table, String xName, String yName1, St
.build();


Layout layout = Layout.builder( "Changes from calculation approaches over " + xName)
Layout layout = Layout.builder( title)
.xAxis(xAxis)
.yAxis(yAxis)
.yAxis2(yAxis2)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,14 +142,14 @@ private static void plotKMTforHeartFigures(Table table) throws IOException {
//####
figures.add( Pair.create( Figures2KN.createHeader1( "Kombiniert" ), null ) );

fig = FiguresKMT.createFigureElaChange(table, ADDTL_PKWKM_ORIG, ADDTL_PKWKM_EL06, ADDTL_PKWKM_EL0306_HALF, ADDTL_PKWKM_FROM_TTIME_29_HALF_InklBVWP, "additional mio vkm/a");
fig = FiguresKMT.createFigureElaChange(table, "Changes in addtl. vkm depending on calculation approaches", ADDTL_PKWKM_ORIG, ADDTL_PKWKM_EL06, ADDTL_PKWKM_EL0306_HALF, ADDTL_PKWKM_FROM_TTIME_29_HALF_InklBVWP, "additional mio vkm/a");
figures.add( Pair.create( Figures2KN.createHeader2( "Kombiniert die verschiedenen Ansätze"), Collections.singletonList( fig )));

//
figures.add( Pair.create( Figures2KN.createHeader1( "NKV" ), null ) );
figures.add( Pair.create( Figures2KN.createHeader2( "Kombiniert die verschiedenen Ansätze"),null));
figures.add( Pair.create( Figures2KN.createHeader2( "Kombiniert die verschiedenen Ansätze - Co2-Preis BVWP"),null));

fig = FiguresKMT.createFigureNkvChange(table, NKV_ORIG_EN, NKV_ADDTL_PKWKM_EL06, NKV_ADDTL_PKWKM_EL0306_HALF, NKV_ADDTL_PKWKM_FROM_TTIME_29_HALF_InklBVWP, "updated BCR");
fig = FiguresKMT.createFigureNkvChange(table, "Changes in BCR depending on calculation approaches", NKV_ORIG_EN, NKV_ADDTL_PKWKM_EL06, NKV_ADDTL_PKWKM_EL0306_HALF, NKV_ADDTL_PKWKM_FROM_TTIME_29_HALF_InklBVWP, "updated BCR");
figures.add( Pair.create( Figures2KN.createHeader2( "Kombiniert die verschiedenen Ansätze"), Collections.singletonList( fig )));

plotFigures("multiplot_hEART.html", figures);
Expand Down

0 comments on commit 1d1f883

Please sign in to comment.