IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 27715


Ignore:
Timestamp:
Apr 20, 2010, 12:49:40 PM (16 years ago)
Author:
eugene
Message:

options for section bounds and label padding

Location:
branches/eam_branches/Ohana.20100407/src
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/Ohana.20100407/src/kapa2/doc/mark.issues.txt

    r27713 r27715  
    11
    2 
    3 * need consistency of graph defaults : axis, tick, labels should come from kapa
    4 * clear should erase current plot
     2* option to set window margin
     3* option to add section outer box
     4* option to set limits based on associated image (and change dynamically...)
     5o need consistency of graph defaults : axis, tick, labels should come from kapa
     6o clear should erase current plot
    57
    68-> The "plot" command needs to be fixed so that boundaries of contours do
    79not cause it to draw excessive amounts of lines connecting unrelated
    810contours. A specific "contour line type" would be useful.
    9 
    10 -> DVO is not consistently placing the x/y axis labels, especially in
    11 user-defined sections of the plot window.
     11(-pt 100?)
    1212
    1313-> DVO does not plot the end-points of histograms properly (e.g., the
     
    1818relay output to the file in the same order. Also, until DVO is closed, the
    1919output does not appear in the file.
     20(fixed both issues)
    2021
     22-> DVO is not consistently placing the x/y axis labels, especially in
     23user-defined sections of the plot window.
     24(fixed)
     25* box -labelpad -labelpad[x,y] +labelpad[x,y] -
     26
  • branches/eam_branches/Ohana.20100407/src/kapa2/src/Graphs.c

    r27713 r27715  
    1313    graph[0].axis[i].min = 0.0;
    1414    graph[0].axis[i].max = 1.0;
    15     graph[0].axis[i].isaxis = TRUE;
    16     graph[0].axis[i].areticks = TRUE;
    17     graph[0].axis[i].islabel = (i < 2);
     15    graph[0].axis[i].isaxis = FALSE;
     16    graph[0].axis[i].areticks = FALSE;
     17    graph[0].axis[i].islabel = FALSE;
    1818    graph[0].axis[i].lweight = 0.0;
    1919    graph[0].axis[i].color = 0;
     
    2323  }   
    2424  graph[0].data.ticktextPad = NAN;
    25   graph[0].data.labelPad = NAN;
     25
     26  graph[0].data.labelPadXm = NAN;
     27  graph[0].data.labelPadXp = NAN;
     28  graph[0].data.labelPadYm = NAN;
     29  graph[0].data.labelPadYp = NAN;
     30
    2631  graph[0].data.padXm = NAN;
    2732  graph[0].data.padXp = NAN;
     
    4954  graph[0].data.flipeast  = 1;          // +East  = -X by default
    5055  graph[0].data.flipnorth = 0;          // +North = +Y by default
     56
     57  graph[0].data.coords.pc1_1 = graph[0].data.coords.pc2_2 = 1.0;
     58  graph[0].data.coords.pc1_2 = graph[0].data.coords.pc2_1 = 0.0;
     59  graph[0].data.coords.crval1 = 0.0;
     60  graph[0].data.coords.crval2 = 0.0;
     61  graph[0].data.coords.crpix1 = 0.0;
     62  graph[0].data.coords.crpix2 = 0.0;
     63  graph[0].data.coords.cdelt1 = graph[0].data.coords.cdelt2 = 1.0;
     64  graph[0].data.flipeast = TRUE;
     65  graph[0].data.flipnorth = FALSE;
     66  strcpy (graph[0].data.coords.ctype, "RA---LIN");
     67  strcpy (graph[0].data.axis, "2222");
     68  strcpy (graph[0].data.ticks, "2222");
     69  strcpy (graph[0].data.labels, "2222");
    5170
    5271  graph[0].Nobjects = 0;
     
    90109   
    91110  /* reset axes and labels */
    92   // for (i = 0; i < 4; i++) {
    93   //   graph[0].axis[i].isaxis = FALSE;
    94   //   graph[0].axis[i].islabel = FALSE;
    95   //   graph[0].axis[i].areticks = FALSE;
    96   // }
     111  for (i = 0; i < 4; i++) {
     112    graph[0].axis[i].isaxis = FALSE;
     113    graph[0].axis[i].islabel = FALSE;
     114    graph[0].axis[i].areticks = FALSE;
     115  }
    97116  for (i = 0; i < 8; i++) {
    98117    strcpy (graph[0].label[i].text, "");
  • branches/eam_branches/Ohana.20100407/src/kapa2/src/LoadFrame.c

    r27714 r27715  
    33int LoadFrame (int sock) {
    44 
    5   int i, color;
    6   char Axis[16], Labels[16], Ticks[16];
    7   double lweight, ticktextPad, labelPad, padXm, padXp, padYm, padYp;
     5  int i;
    86  Section *section;
    97  KapaGraphWidget *graph;
     
    3129  graph[0].axis[3].pad = graph[0].data.padYp;
    3230
     31  graph[0].axis[0].labelPad = graph[0].data.labelPadXm;
     32  graph[0].axis[1].labelPad = graph[0].data.labelPadYm;
     33  graph[0].axis[2].labelPad = graph[0].data.labelPadXp;
     34  graph[0].axis[3].labelPad = graph[0].data.labelPadYp;
     35
    3336  for (i = 0; i < 4; i++) {
    3437    graph[0].axis[i].lweight = graph[0].data.lweight;
    3538    graph[0].axis[i].color = graph[0].data.color;
    3639
    37     graph[0].axis[i].ticktextPad = ticktextPad;
    38     graph[0].axis[i].labelPad = labelPad;
     40    graph[0].axis[i].ticktextPad = graph[0].data.ticktextPad;
    3941
    4042    switch (graph[0].data.axis[i]) {
     
    7476
    7577  SetSectionSizes (section);
    76   if (USE_XWINDOW) DrawFrame (graph);
    77   FlushDisplay ();
     78  Refresh();
     79  // if (USE_XWINDOW) DrawFrame (graph);
     80  // FlushDisplay ();
    7881
    7982  /* XXX why did I do this??? */
  • branches/eam_branches/Ohana.20100407/src/kapa2/src/SetGraphData.c

    r27714 r27715  
    1414  if (section->graph == NULL) {
    1515    section->graph = InitGraph ();
    16     fprintf (stderr, "pad: %f %f %f\n", section->graph->axis[0].pad, section->graph->axis[0].labelPad, section->graph->axis[0].ticktextPad);
    1716    SetSectionSizes (section);
    18     fprintf (stderr, "pad: %f %f %f\n", section->graph->axis[0].pad, section->graph->axis[0].labelPad, section->graph->axis[0].ticktextPad);
    1917  }
    2018  graph = section->graph;
    21   fprintf (stderr, "pad: %f %f %f\n", section->graph->axis[0].pad, section->graph->axis[0].labelPad, section->graph->axis[0].ticktextPad);
    2219 
    2320  KapaScanGraphData (sock, &graph[0].data);
     
    2522  for (i = 0; i < 4; i++) {
    2623    graph[0].axis[i].ticktextPad = graph[0].data.ticktextPad;
    27     graph[0].axis[i].labelPad = graph[0].data.labelPad;
    2824  }   
     25  graph[0].axis[0].labelPad = graph[0].data.labelPadXm;
     26  graph[0].axis[1].labelPad = graph[0].data.labelPadYm;
     27  graph[0].axis[2].labelPad = graph[0].data.labelPadXp;
     28  graph[0].axis[3].labelPad = graph[0].data.labelPadYp;
     29
    2930  graph[0].axis[0].pad = graph[0].data.padXm;
    3031  graph[0].axis[1].pad = graph[0].data.padYm;
  • branches/eam_branches/Ohana.20100407/src/libkapa/include/kapa.h

    r27714 r27715  
    7979  int style, ptype, ltype, etype, ebar, color;
    8080  double lweight, size;
    81   double ticktextPad, labelPad;
     81  double ticktextPad;
     82  double labelPadXm, labelPadYm, labelPadXp, labelPadYp;
    8283  double padXm, padXp, padYm, padYp;
    8384  Coords coords;
  • branches/eam_branches/Ohana.20100407/src/libkapa/src/KapaWindow.c

    r27714 r27715  
    139139                  data[0].lweight, data[0].size);
    140140
    141   KiiSendMessage (fd, "%g %g %g %g %g %g",
    142                   data[0].ticktextPad, data[0].labelPad,
     141  KiiSendMessage (fd, "%g %g %g %g %g",
     142                  data[0].ticktextPad,
    143143                  data[0].padXm, data[0].padXp,
    144144                  data[0].padYm, data[0].padYp);
     145
     146  KiiSendMessage (fd, "%g %g %g %g",
     147                  data[0].labelPadXm, data[0].labelPadXp,
     148                  data[0].labelPadYm, data[0].labelPadYp);
    145149
    146150  KiiSendMessage (fd, "%g %g %g %g",
     
    178182                  &data[0].lweight, &data[0].size);
    179183
    180   KiiScanMessage (fd, "%lf %lf %lf %lf %lf %lf",
    181                   &data[0].ticktextPad, &data[0].labelPad,
     184  KiiScanMessage (fd, "%lf %lf %lf %lf %lf",
     185                  &data[0].ticktextPad,
    182186                  &data[0].padXm, &data[0].padXp,
    183187                  &data[0].padYm, &data[0].padYp);
     188
     189  KiiScanMessage (fd, "%lf %lf %lf %lf",
     190                  &data[0].labelPadXm, &data[0].labelPadXp,
     191                  &data[0].labelPadYm, &data[0].labelPadYp);
    184192
    185193  KiiScanMessage (fd, "%f %f %f %f",
  • branches/eam_branches/Ohana.20100407/src/opihi/cmd.data/box.c

    r27713 r27715  
    4141
    4242  // XXX need to get the current values from kapa
    43   strcpy (graphmode.ticks, "2222");
     43  // strcpy (graphmode.ticks, "2222");
    4444  if ((N = get_argument (argc, argv, "-ticks"))) {
    4545    remove_argument (N, &argc, argv);
     
    5252  }
    5353 
    54   strcpy (graphmode.labels, "2222");
     54  // strcpy (graphmode.labels, "2222");
    5555  if ((N = get_argument (argc, argv, "-labels"))) {
    5656    remove_argument (N, &argc, argv);
     
    6363  }
    6464
    65   strcpy (graphmode.axis, "2222");
     65  // strcpy (graphmode.axis, "2222");
    6666  if ((N = get_argument (argc, argv, "-axis"))) {
    6767    remove_argument (N, &argc, argv);
     
    8080  }
    8181
    82   if ((N = get_argument (argc, argv, "-labelpad"))) {
     82  if ((N = get_argument (argc, argv, "-labelpadx"))) {
    8383    remove_argument (N, &argc, argv);
    84     graphmode.labelPad = atof(argv[N]);
     84    graphmode.labelPadXm = atof(argv[N]);
    8585    remove_argument (N, &argc, argv);
    8686  }
    8787
     88  if ((N = get_argument (argc, argv, "-labelpady"))) {
     89    remove_argument (N, &argc, argv);
     90    graphmode.labelPadYm = atof(argv[N]);
     91    remove_argument (N, &argc, argv);
     92  }
     93
     94  if ((N = get_argument (argc, argv, "+labelpadx"))) {
     95    remove_argument (N, &argc, argv);
     96    graphmode.labelPadXp = atof(argv[N]);
     97    remove_argument (N, &argc, argv);
     98  }
     99
     100  if ((N = get_argument (argc, argv, "+labelpady"))) {
     101    remove_argument (N, &argc, argv);
     102    graphmode.labelPadYp = atof(argv[N]);
     103    remove_argument (N, &argc, argv);
     104  }
     105
     106  if ((N = get_argument (argc, argv, "-labelpad"))) {
     107    remove_argument (N, &argc, argv);
     108    graphmode.labelPadXm = atof(argv[N]);
     109    graphmode.labelPadXp = atof(argv[N]);
     110    graphmode.labelPadYm = atof(argv[N]);
     111    graphmode.labelPadYp = atof(argv[N]);
     112    remove_argument (N, &argc, argv);
     113  }
     114
     115  if ((N = get_argument (argc, argv, "-pad"))) {
     116    remove_argument (N, &argc, argv);
     117    graphmode.padXm = atof(argv[N]);
     118    graphmode.padXp = atof(argv[N]);
     119    graphmode.padYm = atof(argv[N]);
     120    graphmode.padYp = atof(argv[N]);
     121    remove_argument (N, &argc, argv);
     122  }
    88123  if ((N = get_argument (argc, argv, "-xpad"))) {
    89124    remove_argument (N, &argc, argv);
  • branches/eam_branches/Ohana.20100407/src/opihi/cmd.data/section.c

    r27637 r27715  
    4242  if ((N = get_argument (argc, argv, "-bg"))) {
    4343    remove_argument (N, &argc, argv);
    44     background = KapaColorByName(argv[N]);
     44    if (!strcascmp (argv[N], "NONE")) {
     45      background = -1;
     46    } else {
     47      background = KapaColorByName(argv[N]);
     48    }
    4549    remove_argument (N, &argc, argv);
    4650    action = BG;
Note: See TracChangeset for help on using the changeset viewer.