Skip to content

Commit

Permalink
grid color and width
Browse files Browse the repository at this point in the history
  • Loading branch information
LeandroTreu committed May 17, 2024
1 parent 0395227 commit fc77518
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 12 deletions.
2 changes: 2 additions & 0 deletions profile_parser/js/color_cfg.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@ const GREEN = "#388E3C";
const ORANGE = "#F9A825";
const RED = "#E53935";
const YELLOW = "#FFB300";
const GREY = "#E0E0E0";
exports.default = {
BLUE,
GREEN,
ORANGE,
RED,
YELLOW,
GREY,
};
4 changes: 2 additions & 2 deletions profile_parser/js/plot_acc_stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ for (let i = 0; i < benchmarks.length; ++i) {
}
let layout = {
title: "Zoom FPS Benchmark",
yaxis: { title: "Average FPS", range: [0, 61], dtick: 5 },
yaxis: { title: "Average FPS", range: [0, 61], dtick: 5, gridcolor: color_cfg_1.default.GREY, gridwidth: 1.5 },
};
(0, nodeplotlib_1.plot)(data, layout);
// Panning
Expand Down Expand Up @@ -86,6 +86,6 @@ for (let i = 0; i < benchmarks.length; ++i) {
}
layout = {
title: "Panning FPS Benchmark",
yaxis: { title: "Average FPS", range: [0, 61], dtick: 5 },
yaxis: { title: "Average FPS", range: [0, 61], dtick: 5, gridcolor: color_cfg_1.default.GREY, gridwidth: 1.5 },
};
(0, nodeplotlib_1.plot)(data, layout);
22 changes: 19 additions & 3 deletions profile_parser/js/plot_loading_time.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const nodeplotlib_1 = require("nodeplotlib");
const color_cfg_1 = __importDefault(require("./color_cfg"));
let data = [];
// Loading times for huge graph 255 MiB. JSON parsing step about 5 seconds
// Standard: 48, 48, 48, 48
Expand All @@ -11,6 +15,9 @@ let bar = {
y: y_values,
type: 'bar',
name: "Standard",
marker: {
color: color_cfg_1.default.BLUE,
},
// text: y_values.map(String),
// textposition: "auto",
// hoverinfo: "none",
Expand All @@ -19,7 +26,10 @@ let bar = {
symmetric: false,
array: [0, 1],
arrayminus: [0, 3],
visible: true
visible: true,
color: "black",
thickness: 1.0,
width: 10,
},
};
data.push(bar);
Expand All @@ -31,6 +41,9 @@ bar = {
y: y_values,
type: 'bar',
name: "Vertical",
marker: {
color: color_cfg_1.default.GREEN,
},
// text: y_values.map(String),
// textposition: "auto",
// hoverinfo: "none",
Expand All @@ -39,13 +52,16 @@ bar = {
symmetric: false,
array: [1, 1],
arrayminus: [1, 3],
visible: true
visible: true,
color: "black",
thickness: 1.0,
width: 10,
},
};
data.push(bar);
const layout = {
title: "Layout Loading Times",
xaxis: { title: "Loading Scenario" },
yaxis: { title: "Time (s)", autotick: false, dtick: 5 },
yaxis: { title: "Time (s)", autotick: false, dtick: 5, gridcolor: color_cfg_1.default.GREY, gridwidth: 1.5 },
};
(0, nodeplotlib_1.plot)(data, layout);
2 changes: 1 addition & 1 deletion profile_parser/js/plot_stats_comparison.js
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ for (let i = 0; i < files_in_directory.length; ++i) {
}
const layout = {
title: PLOT_TITLE,
yaxis: { title: "Frametime (ms)", autotick: false, dtick: 5 },
yaxis: { title: "Frametime (ms)", autotick: false, dtick: 20, gridcolor: color_cfg_1.default.GREY, gridwidth: 1.5 },
shapes: [
// 60 fps line
{
Expand Down
2 changes: 2 additions & 0 deletions profile_parser/src/color_cfg.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const GREEN = "#388E3C";
const ORANGE = "#F9A825";
const RED = "#E53935";
const YELLOW = "#FFB300";
const GREY = "#E0E0E0";


export default {
Expand All @@ -11,4 +12,5 @@ export default {
ORANGE,
RED,
YELLOW,
GREY,
}
4 changes: 2 additions & 2 deletions profile_parser/src/plot_acc_stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ for (let i = 0; i < benchmarks.length; ++i) {

let layout = {
title: "Zoom FPS Benchmark",
yaxis: {title: "Average FPS", range: [0, 61], dtick: 5},
yaxis: {title: "Average FPS", range: [0, 61], dtick: 5, gridcolor: colors.GREY, gridwidth: 1.5},
}
plot(data, layout);

Expand Down Expand Up @@ -96,6 +96,6 @@ for (let i = 0; i < benchmarks.length; ++i) {

layout = {
title: "Panning FPS Benchmark",
yaxis: {title: "Average FPS", range: [0, 61], dtick: 5},
yaxis: {title: "Average FPS", range: [0, 61], dtick: 5, gridcolor: colors.GREY, gridwidth: 1.5},
}
plot(data, layout);
19 changes: 16 additions & 3 deletions profile_parser/src/plot_loading_time.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { plot, Plot } from 'nodeplotlib';
import colors from "./color_cfg";

let data: Plot[] = [];

Expand All @@ -11,6 +12,9 @@ let bar: Plot = {
y: y_values,
type: 'bar',
name: "Standard",
marker: {
color: colors.BLUE,
},
// text: y_values.map(String),
// textposition: "auto",
// hoverinfo: "none",
Expand All @@ -19,7 +23,10 @@ let bar: Plot = {
symmetric: false,
array: [0, 1],
arrayminus: [0, 3],
visible: true
visible: true,
color: "black",
thickness: 1.0,
width: 10,
},
};
data.push(bar);
Expand All @@ -32,6 +39,9 @@ bar = {
y: y_values,
type: 'bar',
name: "Vertical",
marker: {
color: colors.GREEN,
},
// text: y_values.map(String),
// textposition: "auto",
// hoverinfo: "none",
Expand All @@ -40,14 +50,17 @@ bar = {
symmetric: false,
array: [1, 1],
arrayminus: [1, 3],
visible: true
visible: true,
color: "black",
thickness: 1.0,
width: 10,
},
};
data.push(bar);

const layout = {
title: "Layout Loading Times",
xaxis: {title: "Loading Scenario"},
yaxis: {title: "Time (s)", autotick: false, dtick: 5},
yaxis: {title: "Time (s)", autotick: false, dtick: 5, gridcolor: colors.GREY, gridwidth: 1.5},
}
plot(data, layout);
2 changes: 1 addition & 1 deletion profile_parser/src/plot_stats_comparison.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ for (let i = 0; i < files_in_directory.length; ++i) {

const layout = {
title: PLOT_TITLE,
yaxis: {title: "Frametime (ms)", autotick: false, dtick: 5},
yaxis: {title: "Frametime (ms)", autotick: false, dtick: 20, gridcolor: colors.GREY, gridwidth: 1.5},
shapes: [
// 60 fps line
{
Expand Down

0 comments on commit fc77518

Please sign in to comment.