Changeset 381 in PSPA for Interface_Web
- Timestamp:
- Mar 9, 2013, 5:12:55 PM (12 years ago)
- Location:
- Interface_Web/trunk/pspaWT
- Files:
-
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
Interface_Web/trunk/pspaWT/sources/controler/include/dataManager.h
r368 r381 53 53 bool executeAll(); 54 54 55 void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor);55 void donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor, string& titre, string& legendx, string& legendy); 56 56 57 57 /** … … 63 63 64 64 bool restoreElements(string inputFileName); 65 66 67 65 68 private :69 66 70 67 -
Interface_Web/trunk/pspaWT/sources/controler/include/particleBeam.h
r377 r381 49 49 double getUnnormalizedTranspPhaseSpaceArea(unsigned TranspIndexAbs, unsigned TranspIndexOrd); 50 50 51 52 unsigned pspaCoorIndexFromString(string nameCoor) const; 53 unsigned transportCoorIndexFromString(string nameCoor) const; 54 51 55 inline double dimensionalFactorFromTransportToGraphics(unsigned index) { 52 if ( index == 0 || index == 2 || index == 4 ) return 10.; 53 else return 1.0; 56 if ( index == 0 || index == 2 || index == 4 ) return 10.; // mm 57 else return 1.0; // mrad 54 58 } 59 60 61 55 62 56 63 inline string transportVariableName(unsigned index) { … … 68 75 } 69 76 } 77 78 79 70 80 71 81 inline string graphicTransportUnitName(unsigned index) { … … 107 117 void printAllXYZ() const; 108 118 void Zrange(double& zmin, double& zmax) const; 109 // void donneesDessinEllipseXxp(vector<double>& xcor, vector<double>& ycor); 110 void donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, unsigned indexAbs, unsigned indexOrd); 111 void particlesPhaseSpaceData(vector<double>& xcor, vector<double>& ycor, unsigned indexAbs, unsigned indexOrd); 119 void donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey); 120 void particlesPhaseSpaceData(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey); 112 121 virtual string FileOutputFlow() const; 113 122 virtual bool FileInput(ifstream& ifs); -
Interface_Web/trunk/pspaWT/sources/controler/include/softwareParmela.h
r375 r381 12 12 // donc prevoir un offset pour le raccord a pspa 13 13 unsigned offsetNumElem_; 14 14 // vector<unsigned> relativeParmelaElementNumbers_; 15 15 16 16 bool beamFromParmela(string workingDir,unsigned numeroElement, double referencefrequency, vector<double>& centroid, bareParticle& refPart,vector<bareParticle>& particles ); -
Interface_Web/trunk/pspaWT/sources/controler/src/dataManager.cc
r371 r381 5 5 #include "softwareTransport.h" 6 6 #include "GWt_pspaApplication.h" 7 #include "GWt_console.h" 7 #include "GWt_console.h"Ã 8 8 #include "softwareGenerator.h" 9 9 #include "softwareTest.h" … … 261 261 262 262 // on ne tient pas compte des elements "snapshot" presents dans la beamLine 263 void dataManager::donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor )263 void dataManager::donneesRmsEnveloppe(string type,vector<double>& xcor,vector<double>& ycor, string& titre, string& legendx, string& legendy) 264 264 { 265 265 double longueur = 0.0; … … 267 267 xcor.clear(); 268 268 ycor.clear(); 269 269 titre.clear(); 270 titre = " rms enveloppe "; 271 legendx.clear(); 272 legendx = " z (m)"; 270 273 if ( type == "x" ) { 271 274 unsigned i = 0; … … 274 277 for (unsigned k = firstComputedElemNumero_ -1 ; k < lastComputedElemNumero_ ; k++) { 275 278 abstractElement* elPtr = pspa_->getBeamLine()->getAbstractElement(k); 276 if(elPtr->getNomdElement().getElementType() == snapshot) continue;277 if(elPtr->getNomdElement().getElementType() == fit) continue;279 if(elPtr->getNomdElement().getElementType() == snapshot) continue; 280 // if(elPtr->getNomdElement().getElementType() == fit) continue; 278 281 279 282 if ( !diagnosticBeam_.at(i).momentRepresentationOk() ) { … … 284 287 valeur = diagnosticBeam_.at(i).getXmaxRms(); 285 288 cout << " dataManager::donneesRmsEnveloppe index = " << k << " longueur = " << longueur << " enveloppe : " << valeur << endl; 286 xcor.push_back( longueur);289 xcor.push_back(0.01*longueur); // on passe en metres 287 290 ycor.push_back(valeur); 288 291 i++; 289 292 } 293 legendy.clear(); 294 legendy = " x (cm) "; 290 295 } 291 296 } -
Interface_Web/trunk/pspaWT/sources/controler/src/particleBeam.cc
r377 r381 345 345 346 346 347 void particleBeam::particlesPhaseSpaceData(vector<double>& xcor, vector<double>& ycor, unsigned indexAbs, unsigned indexOrd) { 347 void particleBeam::particlesPhaseSpaceData(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey) { 348 349 unsigned indexAbs, indexOrd; 350 indexAbs = pspaCoorIndexFromString(namex); 351 indexOrd = pspaCoorIndexFromString(namey); 352 348 353 particlesPhaseSpaceComponent(xcor, indexAbs); 349 354 particlesPhaseSpaceComponent(ycor, indexOrd); 355 legende.clear(); 356 legende.push_back( "phase space " + namex + "," + namey); 357 legende.push_back( "particle number : " + mixedTools::intToString(getNbParticles())); 350 358 } 351 359 … … 360 368 if ( index <= 2 ) { 361 369 for (unsigned i = 0; i < goodPartic_.size(); ++i) { 362 coord.at(i) = goodPartic_.at(i).getPosition().getComponent(index);370 coord.at(i) = 10.*goodPartic_.at(i).getPosition().getComponent(index); // en mm 363 371 } 364 372 return; … … 369 377 double begamz = goodPartic_.at(i).getBetaGamma().getComponent(2); 370 378 if ( begamz != 0.0) { 371 coord.at(i) = 1000.*goodPartic_.at(i).getBetaGamma().getComponent(index - 3)/begamz; // mi mmiradians379 coord.at(i) = 1000.*goodPartic_.at(i).getBetaGamma().getComponent(index - 3)/begamz; // milliradians 372 380 } else { 373 381 coord.at(i) = 0.0; … … 403 411 } 404 412 405 406 void particleBeam::donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, unsigned indexAbs, unsigned indexOrd) { 413 unsigned particleBeam::pspaCoorIndexFromString(string nameCoor) const { 414 if ( nameCoor == "x" ) { 415 return 0; 416 } else if ( nameCoor == "y" ) { 417 return 1; 418 } else if ( nameCoor == "dz" ) { 419 return 2; 420 } else if ( nameCoor == "xp" ) { 421 return 3; 422 } else if ( nameCoor == "yp" ) { 423 return 4; 424 } else if ( nameCoor == "dE/E" ) { 425 return 5; 426 } else { 427 return 99; 428 } 429 } 430 431 unsigned particleBeam::transportCoorIndexFromString(string nameCoor) const { 432 if ( nameCoor == "x" ) { 433 return 0; 434 } else if ( nameCoor == "y" ) { 435 return 2; 436 } else if ( nameCoor == "dz" ) { 437 return 4; 438 } else if ( nameCoor == "xp" ) { 439 return 1; 440 } else if ( nameCoor == "yp" ) { 441 return 3; 442 } else if ( nameCoor == "dE/E" ) { 443 return 5; 444 } else { 445 return 99; 446 } 447 } 448 449 //void particleBeam::donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, unsigned indexAbs, unsigned indexOrd) { 450 451 void particleBeam::donneesDessinEllipse(vector<double>& xcor, vector<double>& ycor, vector<string>& legende, string namex, string namey) { 407 452 int k; 408 453 double x,y; 409 cout << " particleBeam::donneesDessinEllipse index recus x" << indexAbs << " index y " << indexOrd << endl; 410 411 if ( !momentRepresentationOk_ ) return; 412 413 if ( indexAbs > 5 || indexOrd > 5 ) return; 454 if ( !momentRepresentationOk_ ) buildMomentRepresentation(); 455 456 // if ( !momentRepresentationOk_ ) return; 457 458 unsigned indexAbs, indexOrd; 459 460 461 // index TRANSPORT 462 indexAbs = transportCoorIndexFromString(namex); 463 indexOrd = transportCoorIndexFromString(namey); 464 cout << " namex= " << namex << " indexAbs= " << indexAbs << " namey= " << namey << " indexOrd= " << indexOrd << endl; 465 if ( indexAbs > 5 || indexOrd > 5 ) return; 414 466 415 467 xcor.clear(); 416 468 ycor.clear(); 417 // les index sont dans l'ordre x,y,z,xp,yp, de/E 418 // on traduit en TRANSPORT 419 420 indexAbs = indexFromPspaToTransport(indexAbs); 421 indexOrd = indexFromPspaToTransport(indexOrd); 469 422 470 423 471 … … 427 475 428 476 429 // a completer 477 430 478 legende.clear(); 431 479 // if ( indexAbs == 0 && indexOrd == 1 ) { -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareParmela.cc
r373 r381 112 112 } 113 113 114 115 114 116 bool softwareParmela::buildBeamAfterElements(unsigned int numeroDeb,unsigned int numeroFin, vector<particleBeam>& beams, string workingDir) 115 117 { … … 130 132 string cliche = workingDir + param[2].c_str(); 131 133 if( beamToParmela(cliche,&beams.at(avantDernier)) ) { 132 cout <<"["<<k<<"] : ecrit sur fichier " << cliche << " le contenu de beam["<<avantDernier<<"]"<<endl;134 cout << "[" << k << "] : ecrit sur fichier " << cliche << " le contenu de beam["<<avantDernier<<"]"<<endl; 133 135 } 134 continue;136 // continue; 135 137 } 136 138 … … 144 146 double freq= globParamPtr_->getFrequency(); 145 147 148 cout << " lecture PARMELA el no absolu " << k << " nom " << elem->getNomdElement().getElementName() << endl; 146 149 if(!beamFromParmela(workingDir,id,freq,centroid,refPart,particles)) 147 150 { -
Interface_Web/trunk/pspaWT/sources/controler/src/softwareTransport.cc
r355 r381 153 153 string cliche = workingDir + param[2].c_str(); 154 154 cout<<"["<<k<<"] : ecrit sur fichier " << cliche << " le contenu de beam["<<avantDernier<<"]"<<endl; 155 continue;155 // continue; 156 156 } 157 157 -
Interface_Web/trunk/pspaWT/sources/userInterface/include/GWt_pspaApplication.h
r379 r381 84 84 85 85 void dialogOnGraphics(); 86 // void setModelComponentForPhaseSpace(WStandardItemModel* model, vector<bareParticle>& partic, unsigned indexParticleComponent, unsigned modelComponent); 87 void faireDessinParmela(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd, string namex, string namey ); 88 void faireDessinTransport(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd, string namex, string namey); 86 void faireDessinPhaseSpace(WContainerWidget* toto, particleBeam* beam, string namex, string namey, int typeFaisceau); 87 88 // void setModelComponentForPhaseSpace(WStandardItemModel* model, vector<bareParticle>& partic, unsigned indexParticleComponent, unsigned modelComponent); 89 void faireDessinParmela(WContainerWidget* toto, particleBeam* beam, string namex, string namey ); 90 void faireDessinTransport(WContainerWidget* toto, particleBeam* beam, string namex, string namey); 89 91 void faireDessinEnveloppe(WContainerWidget* toto, string type); 90 92 // void scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor); 91 void chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints, int width, int height, bool makeIcon=false);93 void chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints, string title, string legendx, string legendy, int width, int height, bool makeIcon=false); 92 94 bool removePathFromConfigName(string& config); 93 95 bool removeExtensionFromConfigName(string& config); -
Interface_Web/trunk/pspaWT/sources/userInterface/src/GWt_pspaApplication.cc
r379 r381 512 512 int typeFaisceau = choixTypeDessinFaisceau_->currentIndex(); 513 513 int index = choixElementDessin_->currentIndex(); 514 unsigned xabs = choixAbsPhase_->currentIndex();515 unsigned yord = choixOrdPhase_->currentIndex();516 if ( xabs == yord ) {514 string nameAbs = choixAbsPhase_->currentText().toUTF8(); 515 string nameOrd = choixOrdPhase_->currentText().toUTF8(); 516 if ( nameAbs == nameOrd ) { 517 517 GWt_dialog phaseSpaceError(" graphical analysis", "the beam coordinates must be different !", GWt_dialog::Error, false,true); 518 518 phaseSpaceError.exec(); 519 519 return; 520 520 } 521 string nameAbs = choixAbsPhase_->currentText().toUTF8();522 string nameOrd = choixOrdPhase_->currentText().toUTF8();523 521 524 522 particleBeam* beam = dtmanage_->getDiagnosticBeam(index); … … 531 529 532 530 toto_->clear(); 533 534 if ( typeFaisceau == 0 ) 535 {536 if ( !beam->momentRepresentationOk() ) beam->buildMomentRepresentation();537 cout << " PspaApplication::dessinerPhaseSpace cood cliquees " << xabs << " " << yord << endl;538 faireDessinTransport(toto_, beam, xabs, yord, nameAbs, nameOrd );539 }540 else if ( typeFaisceau == 1 )541 {542 if ( beam->particleRepresentationOk() ) faireDessinParmela(toto_, beam, xabs, yord, nameAbs, nameOrd );543 else {544 GWt_dialog warningBeamState(" graphical analysis", "the beam state does not allow providing a drawing with macroparticles !", GWt_dialog::Error, false,true);545 warningBeamState.exec();546 }547 }548 else {549 GWt_dialog warningTypeDrawing(" graphical analysis", "type of drawing not programmed !", GWt_dialog::Error, false,true);550 warningTypeDrawing.exec();551 }531 faireDessinPhaseSpace(toto_, beam, nameAbs, nameOrd, typeFaisceau); 532 533 // if ( typeFaisceau == 0 ) 534 // { 535 // if ( !beam->momentRepresentationOk() ) beam->buildMomentRepresentation(); 536 // faireDessinTransport(toto_, beam, nameAbs, nameOrd ); 537 // } 538 // else if ( typeFaisceau == 1 ) 539 // { 540 // if ( beam->particleRepresentationOk() ) faireDessinParmela(toto_, beam, nameAbs, nameOrd ); 541 // else { 542 // GWt_dialog warningBeamState(" graphical analysis", "the beam state does not allow providing a drawing with macroparticles !", GWt_dialog::Error, false,true); 543 // warningBeamState.exec(); 544 // } 545 // } 546 // else { 547 // GWt_dialog warningTypeDrawing(" graphical analysis", "type of drawing not programmed !", GWt_dialog::Error, false,true); 548 // warningTypeDrawing.exec(); 549 // } 552 550 } 553 551 … … 579 577 vector<double> xcor; 580 578 vector<double> ycor; 581 // dtmanage_->donneesRmsEnveloppe(type,1, nbel, xcor,ycor); 582 dtmanage_->donneesRmsEnveloppe(type,xcor,ycor); 583 chartPlot2vec(envDialog->contents(), xcor, ycor, false,500,300); 584 585 } 586 587 void PspaApplication::faireDessinParmela(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd, string namex, string namey ) 579 string titre; 580 string legendx; 581 string legendy; 582 dtmanage_->donneesRmsEnveloppe(type,xcor,ycor, titre, legendx, legendy); 583 chartPlot2vec(envDialog->contents(), xcor, ycor, false,titre, legendx, legendy,500,300); 584 585 } 586 587 void PspaApplication::faireDessinPhaseSpace(WContainerWidget* toto, particleBeam* beam, string namex, string namey, int typeFaisceau) 588 { 589 590 vector<double> xcor; 591 vector<double> ycor; 592 vector<string> legende; 593 string titre; 594 bool pointsDrawing; 595 if ( typeFaisceau == 0 ) { 596 pointsDrawing = false; 597 titre = "phase space rms"; 598 beam->donneesDessinEllipse(xcor,ycor,legende, namex, namey); 599 } else if ( typeFaisceau == 1 ) { 600 pointsDrawing = true; 601 titre = " phase space "; 602 beam->particlesPhaseSpaceData(xcor, ycor, legende, namex, namey); 603 } else { 604 GWt_dialog warningBeamState(" graphical analysis", "the beam state does not allow providing a drawing with macroparticles !", GWt_dialog::Error, false,true); 605 warningBeamState.exec(); 606 return; 607 } 608 609 610 GWt_dialog* phaseSpaceDialog = new GWt_dialog("phase space",toto,false); 611 eDialog_.push_back(phaseSpaceDialog); 612 phaseSpaceDialog->setMinimumSize(400,400); 613 phaseSpaceDialog->setClosable(true); 614 new WText(nameOfCase_, phaseSpaceDialog->contents()); 615 616 617 for (int k=0 ; k < legende.size(); k++) { 618 new WBreak(phaseSpaceDialog->contents()); 619 new WText(legende.at(k), phaseSpaceDialog->contents()); 620 } 621 chartPlot2vec(phaseSpaceDialog->contents(), xcor, ycor,pointsDrawing ,titre, namex, namey,500,300); 622 phaseSpaceDialog->show(); 623 624 } 625 626 627 628 void PspaApplication::faireDessinParmela(WContainerWidget* toto, particleBeam* beam, string namex, string namey ) 588 629 { 589 630 cout << " faireDessinParmela " << endl; … … 594 635 // pointsDialog->show(); 595 636 596 // vector<bareParticle>& partic = beam->getParticleVector();597 new WText(nameOfCase_ + " : phase space " + namex + " ," + namey + " ; particle number : "+ mixedTools::intToString(beam->getNbParticles()), pointsDialog->contents()); 637 new WText(nameOfCase_, pointsDialog->contents()); 638 598 639 599 640 vector<double> xcor; 600 641 vector<double> ycor; 601 beam->particlesPhaseSpaceData(xcor, ycor, indexAbs, indexOrd); 602 chartPlot2vec(pointsDialog->contents(), xcor, ycor, true,400,400); 642 vector<string> legende; 643 beam->particlesPhaseSpaceData(xcor, ycor, legende, namex, namey); 644 for (int k=0 ; k < legende.size(); k++) { 645 new WBreak(pointsDialog->contents()); 646 new WText(legende.at(k), pointsDialog->contents()); 647 } 648 string titre = " phase space "; 649 chartPlot2vec(pointsDialog->contents(), xcor, ycor, true,titre,namex, namey,400,400); 603 650 604 651 … … 610 657 } 611 658 612 void PspaApplication::faireDessinTransport(WContainerWidget* toto, particleBeam* beam, unsigned indexAbs, unsigned indexOrd,string namex, string namey)659 void PspaApplication::faireDessinTransport(WContainerWidget* toto, particleBeam* beam, string namex, string namey) 613 660 { 614 661 GWt_dialog* ellipseDialog = new GWt_dialog("ellipse",toto,false); … … 622 669 vector<double> ycor; 623 670 vector<string> legende; 624 beam->donneesDessinEllipse(xcor,ycor,legende, indexAbs, indexOrd);671 beam->donneesDessinEllipse(xcor,ycor,legende, namex, namey); 625 672 626 673 for (int k=0 ; k < legende.size(); k++) { … … 628 675 new WText(legende.at(k), ellipseDialog->contents()); 629 676 } 630 // beam->donneesDessinEllipseXxp(xcor,ycor); 631 // scatterPlot1D(ellipseDialog->contents(),xcor,ycor); 632 chartPlot2vec(ellipseDialog->contents(), xcor, ycor, false,500,300); 633 } 634 635 // void PspaApplication::scatterPlot1D(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor) 636 // { 637 // int nbpts = xcor.size(); 638 // cout << " PspaApplication::scatterPlot1D nbpts = " << nbpts << endl; 639 // WStandardItemModel *model = new WStandardItemModel(nbpts, 2, toto); 640 // for (int i = 0; i < nbpts; ++i) { 641 // model->setData(i, 0, xcor.at(i)); 642 // model->setData(i, 1, ycor.at(i)); 643 // // cout << " PspaApplication::scatterPlot1D el= " << i+1 << " x= " << xcor.at(i) << " y= " << ycor.at(i) << endl; 644 // } 645 646 // WCartesianChart *chart = new WCartesianChart(toto); 647 // chart->setTitle("titre"); 648 649 // // chart->initLayout(); 650 651 // chart->setModel(model); // set the model 652 // chart->setXSeriesColumn(0); // set the column that holds the X data 653 // chart->setLegendEnabled(true); // enable the legend 654 655 // chart->setType(ScatterPlot); // set type to ScatterPlot 656 657 // // Typically, for mathematical functions, you want the axes to cross 658 // // at the 0 mark: 659 // chart->axis(XAxis).setLocation(ZeroValue); 660 // chart->axis(YAxis).setLocation(ZeroValue); 661 662 // // Provide space for the X and Y axis and title. 663 // // chart->setPlotAreaPadding(80, Left); 664 // // chart->setPlotAreaPadding(40, Top | Bottom); 665 // // Add the curves 666 // WDataSeries s(1, LineSeries, Y1Axis); 667 // chart->addSeries(s); 668 669 // // chart->setBackground (WBrush(WColor("blue"))); 670 // chart->resize(500, 300); // WPaintedWidget must be given explicit size 671 672 // #ifdef HAS_IMAGEMAGIC 673 // Wt::WRasterImage pngImage("png", 600, 600); 674 // Wt::WPainter p(&pngImage); 675 676 // chart->paint(p); 677 // std::string name; 678 // name = workingDir_ + "/chart-"+sessionId ()+".png"; 679 // std::ofstream f(name.c_str(), std::ios::out |std::ios::trunc | std::ios::binary); 680 // pngImage.write(f); 681 682 // new WText("<a href='workingArea/chart-"+sessionId ()+".png' target='_blank'>Afficher l'image</a>",toto); 683 684 // /* 685 // Wt::WPdfImage pdfImage("30cm", "30cm"); 686 // Wt::WPainter p1(&pdfImage); 687 // chart->paint(p1); 688 // std::ofstream f1("chart.pdf", std::ios::out | std::ios::binary); 689 // pdfImage.write(f1); 690 // */ 691 // #endif 692 // } 693 694 // dernier parametre, drawPoints : true = on trace des points (phase space) ; false = on trace des lignes 'enveloppes...) 695 void PspaApplication::chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints,int width, int height, bool makeIcon) 677 string titre = "phase space rms"; 678 chartPlot2vec(ellipseDialog->contents(), xcor, ycor, false,titre, namex, namey,500,300); 679 } 680 681 682 // parametre drawPoints : true = on trace des points (phase space) ; false = on trace des lignes (enveloppes...) 683 void PspaApplication::chartPlot2vec(WContainerWidget* toto, vector<double>& xcor, vector<double>& ycor, bool drawPoints,string title,string legendx, string legendy,int width, int height, bool makeIcon) 696 684 { 697 685 int nbpts = xcor.size(); … … 706 694 WCartesianChart *chart = new WCartesianChart(toto); 707 695 if (!makeIcon) { 708 chart->setTitle( "titre");696 chart->setTitle(title); 709 697 } 710 698 chart->initLayout(); … … 726 714 727 715 // Provide space for the X and Y axis and title. 728 if ( drawPoints ) {729 chart->setPlotAreaPadding( 80, Left);730 chart->setPlotAreaPadding( 40, Top | Bottom);731 WDataSeries s(1, PointSeries, Y1Axis);732 chart->addSeries(s);733 chart->resize(width, height); // WPaintedWidget must be given explicit size734 } else {716 chart->setPlotAreaPadding(80, Left); // ? 717 chart->setPlotAreaPadding(40, Bottom); 718 chart->setPlotAreaPadding(60, Top); 719 if ( drawPoints ) { 720 WDataSeries s(1, PointSeries, Y1Axis); 721 chart->addSeries(s); 722 } else { 735 723 WDataSeries s(1, LineSeries, Y1Axis); 736 724 chart->addSeries(s); 725 } 737 726 chart->resize(width, height); // WPaintedWidget must be given explicit size 738 } 727 728 729 WAxis& axis = chart->axis(XAxis); 730 axis.setLabelFormat("%.3f"); 731 // axis.setGridLinesEnabled(true); 732 axis.setTitle(legendx); 733 734 WAxis& axey = chart->axis(YAxis); 735 axey.setTitle(legendy); 736 // axis = chart->axis(YAxis); 737 // axis.setLabelFormat("%.3f"); 738 // axis.setGridLinesEnabled(true); 739 // axis.setTitle(legendy); 739 740 740 741 if (makeIcon) { … … 903 904 string unites[2]; 904 905 if(iabs == 0 || iabs == 1 || iabs == 2) { 905 unites[0]= unites[1]= " cm";906 unites[0]= unites[1]= " mm"; 906 907 } 907 908 if(iabs == 3 || iabs == 4) { … … 942 943 axis.setGridLinesEnabled(true); 943 944 944 if(iabs == 0) axis.setTitle(WString(" x ( cm)"));945 if(iabs == 1) axis.setTitle(WString(" y ( cm)"));946 if(iabs == 2) axis.setTitle(WString(" z ( cm)"));945 if(iabs == 0) axis.setTitle(WString(" x (mm)")); 946 if(iabs == 1) axis.setTitle(WString(" y (mm)")); 947 if(iabs == 2) axis.setTitle(WString(" z (mm)")); 947 948 if(iabs == 3) axis.setTitle(WString(" xp (mrad)")); 948 949 if(iabs == 4) axis.setTitle(WString(" yp (mrad)")); -
Interface_Web/trunk/pspaWT/workingArea/philFit.save
r376 r381 3 3 rfgun 4 4 rfgun01 5 1500 5 0.15 500 5 0.1 6 6 0 0 7 7 1e-06 1e-12
Note: See TracChangeset
for help on using the changeset viewer.