Changeset 2115 in Sophya for trunk/SophyaPI/PIext


Ignore:
Timestamp:
Jul 17, 2002, 11:59:50 PM (23 years ago)
Author:
cmv
Message:

ResizeMinMax: cmv 17/07/2002

Location:
trunk/SophyaPI/PIext
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/SophyaPI/PIext/pigfd1.cc

    r2092 r2115  
    33#include <stdio.h>
    44#include "pigfd1.h"
    5 
    6 #define PERC_GARDE 0.02
    75 
    86/* --Methode-- */
     
    4240if(mGFD->NData()<=0) return;
    4341if(VarX<0) return;
    44 double dx, dy;
    4542double xmin=9.e19, xmax=-9.e19, ymin=9.e19, ymax=-9.e19;
    4643mGFD->GetMnMx(10*VarX+2,xmin,xmax);
     
    4845if(xmax<=xmin) xmax = xmin+1.;
    4946if(ymax<=ymin) ymax = ymin+1.;
    50 dx = PERC_GARDE*(xmax-xmin);
    51 dy = PERC_GARDE*(ymax-ymin);
    52 SetLimits((double)xmin-dx,(double)xmax+dx,(double)ymin-dy,(double)ymax+dy);
     47PIAxes::ReSizeMinMax(isLogScaleX(),xmin,xmax);
     48PIAxes::ReSizeMinMax(isLogScaleY(),ymin,ymax);
     49SetLimits(xmin,xmax,ymin,ymax);
    5350SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
    5451}
  • trunk/SophyaPI/PIext/pintuple.cc

    r2092 r2115  
    55#include <stdio.h>
    66#include "pintuple.h"
    7 
    8 #define PERC_GARDE 0.02
    97
    108//++
     
    126124
    127125  // Commencer par trouver nos limites
    128   double dx, dy;
    129126  double xmin, xmax, ymin, ymax;
    130127  xmin = ymin = 9.e19;
     
    132129  mNT->GetMinMax(xK, xmin, xmax);
    133130  mNT->GetMinMax(yK, ymin, ymax);
    134    
    135   dx = PERC_GARDE*(xmax-xmin);
    136   dy = PERC_GARDE*(ymax-ymin);
    137  
    138   SetLimits(xmin-dx, xmax+dx, ymin-dy, ymax+dy);
     131  PIAxes::ReSizeMinMax(isLogScaleX(),xmin,xmax);
     132  PIAxes::ReSizeMinMax(isLogScaleY(),ymin,ymax);
     133  SetLimits(xmin,xmax,ymin,ymax);
    139134//  SetAxesFlags(kBoxAxes | kExtTicks | kLabels);  Ne pas faire - Reza 11/99
    140135}
     
    175170nok = 0; 
    176171xp = yp = xl = yl = 0;
    177 for (int i=0; i<mNT->NbLines(); i++) {
     172for (long i=0; i<(long)mNT->NbLines(); i++) {
    178173  xl = xp;  yl = yp;
    179174  xp = mNT->GetCell(i, xK);
     
    247242info += buff;
    248243info += mNT->LineHeaderToString();
    249 for (int i=0; i<mNT->NbLines(); i++) {
     244for(long i=0; i<(long)mNT->NbLines(); i++) {
    250245  xp = mNT->GetCell(i, xK);
    251246  yp = mNT->GetCell(i, yK);
  • trunk/SophyaPI/PIext/pistlist.cc

    r2092 r2115  
    44#include <stdio.h>
    55#include "pistlist.h"
    6 
    7 #define PERC_GARDE 0.02
    86
    97//++
     
    8482
    8583  // Commencer par trouver nos limites
    86   double dx, dy;
    87   double x1, x2, y1, y2;
     84  double x1,x2,y1,y2;
    8885  mStL->CalcXYLimits(x1, x2, y1, y2);
    89  
    90   dx = PERC_GARDE*(x2-x1);
    91   dy = PERC_GARDE*(y2-y1);
    92  
    93   SetLimits(x1-dx, x2+dx, y1-dy, y2+dy);
     86  PIAxes::ReSizeMinMax(isLogScaleX(),x1,x2);
     87  PIAxes::ReSizeMinMax(isLogScaleY(),y1,y2);
     88  SetLimits(x1,x2,y1,y2);
    9489  SetAxesFlags(kBoxAxes | kExtTicks | kLabels);
    9590}
Note: See TracChangeset for help on using the changeset viewer.