Commit 6e214dca authored by LIGNEUL CLEMENT's avatar LIGNEUL CLEMENT
Browse files

add 'update plot' feature + update doc

parent 8f86b4b6
all:
@echo "\n##### Start the packaging #####\n"
install:
@echo "\n##### Install modules #####\n"
npm install
@echo "\n##### Start the packaging #####\n"
@echo "\n##### Initialization #####\n"
......
......@@ -40,12 +40,16 @@ To use this program, it is necessary to have installed the most recent version o
## Installation
- Clone this repository
- Install modules with `npm install` or `npm i` from root. This installation may take some time
- Pour lancer le programme exécuter `npm start` depuis la racine
- To run the application execute `npm start` from root
## Generating the executable for exporting the application
- Run `make`
- Run `make install` in `easea-compiler-app/`
- The executable is located in `EASEA-compiler-app/`
- To remove the generated executable use `make clean`
(DEV) To run the application execute `npm start`
---
## Next features
- See all results after the runs
- Analyze and repair csv files to fix the bug on very fast runs (<1s)
- Gitlab pages for documentation ?
EASEA Compiler App Documentation
================================
= EASEA Compiler App Documentation
Clément Ligneul <clement.ligneul@etu.unistra.fr>
v1.0 2021-07-19
v1.1 2021-07-21
:toc: left
:toclevels: 4
:hide-uri-scheme:
......@@ -311,7 +310,7 @@ In each graph there are 3 elements :
This plot replaces the graph with the violin plots if you have compiled and run a program with the options for <<Multi-objective problems>>.
image::images/3d_results.png[3d results image, 700, align=center]
image::images/3D_update.png[3d results image, 700, align=center]
==== 3D plot interactive version
......@@ -333,7 +332,17 @@ To save the results you can click on the appropriate button :
- `Save interactive plot` will save the html file that you open when you double-click the image in the app.
We recommend to save your plots from the interactive version with camera icon. This way you can save the view you want with a better quality
We recommend to save your plots from the interactive version with camera icon. This way you can save the view you want with a better quality.
==== Edit the results graph
image::images/update_menu.png[ update plot menu image, 300, align=center]
Once you have generated the result plot you can edit it. It is possible to change :
- The plot title
- The axis name if the plot is a 3D plot
- The number of violin plots if the plot is a 2D plot
== Multi-objective problems
......
This diff is collapsed.
EASEA Compiler App Documentation
================================
= EASEA Compiler App Documentation
Clément Ligneul <clement.ligneul@etu.unistra.fr>
v1.0 2021-07-19
v1.1 2021-07-21
:toc: left
:toc-title: Table des matières
:toclevels: 4
......@@ -300,7 +299,7 @@ Dans chaque graphe on retrouve 3 éléments :
Ce graphique remplace celui avec les diagrammes en violon si vous avez compilé avec une option pour un <<Problèmes multi-objectifs, problème multi-objectifs>>.
image::images/3d_results.png[3d results image, 700, align=center]
image::images/3D_update.png[3d results image, 700, align=center]
==== Version interactive du graphique 3D
......@@ -324,6 +323,16 @@ Pour sauvegarder les graphes cliquez sur le bouton approprié :
Il est recommandé de sauvegarder vos graphes depuis le mode interactif en cliquant sur l'icône appareil photo. De cette manière vous pourrez sauvegarder la vue que vous souhaitez et avec une meilleure qualité.
==== Editer le graphe des résultats
image::images/update_menu.png[ update plot menu image, 300, align=center]
Une fois généré, le graphe des résultats est modifiable. Il est possible de changer :
- Le titre
- Le nom des axes s'il s'agit d'un graphe 3D
- Le nombre de diagrammes en violon s'il s'agit d'un graphe 2D
== Problèmes multi-objectifs
Pour les problèmes multi-objectifs les options de compilation sont :
......
This diff is collapsed.
documentation/images/2d_results.png

48.8 KB | W: | H:

documentation/images/2d_results.png

48.4 KB | W: | H:

documentation/images/2d_results.png
documentation/images/2d_results.png
documentation/images/2d_results.png
documentation/images/2d_results.png
  • 2-up
  • Swipe
  • Onion skin
documentation/images/general_menu.png

86.8 KB | W: | H:

documentation/images/general_menu.png

86.8 KB | W: | H:

documentation/images/general_menu.png
documentation/images/general_menu.png
documentation/images/general_menu.png
documentation/images/general_menu.png
  • 2-up
  • Swipe
  • Onion skin
import plotly.express as px
import os
from pandas.io.parsers import read_csv
import plotly.express as px
import sys
# arguments [nb_gen, nb_plots, csv_file, title, f1, f2, f3]
if len(sys.argv) != 8:
# print(
# "Usage : " + sys.argv[0] + " <nb of generations> <nb of plots> <csv file>",
# file=sys.stderr,
# )
print(
"Usage : " + sys.argv[0] + " <nb of generations> <nb of plots> <csv file> <title> <f1> <f2> <f3>",
file=sys.stderr,
)
exit(1)
if sys.argv[4] :
......@@ -41,8 +40,15 @@ fig = px.scatter_3d(
df, x="f1", y="f2", z="f3", color="f2", size="f3", size_max=18, opacity=0.7
)
fig.update_traces(
marker_colorbar_title_text=name_y
)
fig.update_layout(
title= titre,
title=titre,
coloraxis_colorbar=dict(
title=name_y,
),
margin=dict(l=65, r=0, b=10, t=90),
scene=dict(
xaxis_title=name_x,
......
......@@ -44,8 +44,7 @@ help_action.addEventListener('triggered', () => {
} else if (os.type() === 'Darwin') {
command = 'open';
}
// spawn(command, ['https://git.unistra.fr/ligneul/easea-compiler-app'], { detached: true });
spawn(command, [process.cwd() + '/documentation/manual/doc_en.html'], { detached: true });
spawn(command, [process.cwd() + '/documentation/doc_en.html'], { detached: true });
});
const EASEA_action = new QAction();
......
......@@ -218,7 +218,6 @@ export class Plot_result {
// updating label
this.update_label.setText('updating ...');
// this.update_label.setFixedSize(80,30);
this.update_label.setAlignment(AlignmentFlag.AlignCenter);
this.update_label.hide();
......
......@@ -7,6 +7,8 @@ import { Win_alert } from './win_alert';
import * as plot_generation from './plot_generation';
import { plot_obj, run_obj } from './index';
import { initial_proc } from './run_tab';
import * as util from './utilities';
require('child_process').spawn('node', ['--version'], {
env: {
......@@ -172,6 +174,13 @@ export class Pseudo_term {
run_obj.running_label.setText('Writing results ...');
run_obj.running_label.show();
plot_generation.parser(data);
// if(run_obj.plot_type === '2D'){
// //FAIRE ECRITURE DANS LE FICHIER CORRESPONDANT AU RANG DU RUN
// console.log('écriture du run ' + rank)
// if(rank)
// util.write_results(rank, data);
// }
});
child.on('exit', (code) => {
......
import { QBoxLayout, QDialog, QGridLayout, QLineEdit, QPushButton, QWidget, WindowType } from "@nodegui/nodegui";
import { QBoxLayout, QDialog, QGridLayout, QPushButton, QWidget, WindowType } from "@nodegui/nodegui";
import { plot_obj, run_obj } from ".";
import { Advanced_option_widget } from "./advanced_option_widget";
import * as util from './utilities';
......
import { ChildProcess } from "child_process";
import { Win_alert } from "./win_alert";
import fs from 'fs';
// sleep function equivalent (async call)
export function sleep(ms: number) {
......@@ -66,4 +66,19 @@ export function print_errors(errors: string[]) {
message = message.concat('\n- ' + errors[i]);
new Win_alert(message, 'Parameters Error');
}
//write results in file
export function write_results(rank: number, buffer: string){
var fd: number;
var filename = 'plotting/run_data_' + rank + '.log';
try {
fd = fs.openSync(filename, 'ax');
fs.writeFileSync(fd, buffer);
} catch {
fd = fs.openSync(filename, 'a');
fs.writeFileSync(fd, buffer);
}
fs.writeFileSync(fd, '\n');
fs.closeSync(fd);
}
\ No newline at end of file
{
"typedocOptions": {
"entryPoints": ["src/index.ts"],
"out": "documentation/code",
"exclude": "src/*.py"
},
"compilerOptions": {
"incremental": true,
"target": "es2016",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment