Ejemplo n.º 1
0
void set_default_legend(legend *l)
{
    int i;

    l->active = OFF;
    l->loctype = VIEW;
    l->layout = 0;
    l->vgap = 2;
    l->hgap = 1;
    l->len = 4;
    l->legx = 0.8;
    l->legy = 0.8;
    l->font = grdefaults.font;
    l->charsize = 1.0;
    l->color = grdefaults.color;
    l->linew = grdefaults.linew;
    l->lines = grdefaults.lines;
    l->box = OFF;
    l->boxfill = OFF;
    l->boxfillusing = COLOR;
    l->boxfillcolor = 0;
    l->boxfillpat = 1;
    l->boxlcolor = grdefaults.color; /* color for symbol */
    l->boxlinew = grdefaults.linew; /* set plot sym line width */
    l->boxlines = grdefaults.lines; /* set plot sym line style */
    for (i = 0; i < MAXPLOT; i++)
    {
        set_default_string(&(l->str[i]));
    }
}
Ejemplo n.º 2
0
void set_default_graph(int gno)
{
    int i;

    g[gno].active = OFF;
    g[gno].hidden = FALSE;
    g[gno].label = OFF;
    g[gno].type = XY;
    g[gno].auto_type = AUTO;
    g[gno].revx = FALSE;
    g[gno].revy = FALSE;
    g[gno].ws_top = 0;
    g[gno].maxplot = maxplot;
    g[gno].dsx = g[gno].dsy = 0.0; /* locator props */
    g[gno].pointset = FALSE;
    g[gno].pt_type = 0;
    g[gno].fx = GENERAL;
    g[gno].fy = GENERAL;
    g[gno].px = 6;
    g[gno].py = 6;
    set_default_ticks(&g[gno].t[0], X_AXIS);
    set_default_ticks(&g[gno].t[1], Y_AXIS);
    set_default_ticks(&g[gno].t[2], ZX_AXIS);
    set_default_ticks(&g[gno].t[3], ZY_AXIS);
    set_default_ticks(&g[gno].t[4], XA_AXIS);
    set_default_ticks(&g[gno].t[5], YA_AXIS);
    set_default_framep(&g[gno].f);
    set_default_world(&g[gno].w);
    set_default_view(&g[gno].v);
    set_default_legend(&g[gno].l);
    set_default_string(&g[gno].labs.title);
    g[gno].labs.title.charsize = 1.5;
    set_default_string(&g[gno].labs.stitle);
    g[gno].labs.stitle.charsize = 1.0;
    for (i = 0; i < maxplot; i++)
    {
        set_default_plotarr(&g[gno].p[i]);
    }
    set_default_velocityp(&g[gno].vp);
}
Ejemplo n.º 3
0
void set_default_velocityp(velocityp *vp)
{
    vp->active = OFF;
    vp->type = 0;
    vp->loctype = VIEW;
    vp->velx = 0.8;
    vp->vely = 0.7;
    vp->lines = grdefaults.lines;
    vp->linew = grdefaults.linew;
    vp->color = grdefaults.color;
    set_default_string(&(vp->vstr));
    vp->arrowtype = 0;
    vp->vscale = 1.0;
    vp->units = 0;
    vp->userlength = 1.0;
}
Ejemplo n.º 4
0
void set_default_annotation(void)
{
    int i;

    boxes = (boxtype *)malloc(maxboxes * sizeof(boxtype));
    lines = (linetype *)malloc(maxlines * sizeof(linetype));
    pstr = (plotstr *)malloc(maxstr * sizeof(plotstr));

    for (i = 0; i < maxboxes; i++)
    {
        set_default_box(&boxes[i]);
    }
    for (i = 0; i < maxlines; i++)
    {
        set_default_line(&lines[i]);
    }
    for (i = 0; i < maxstr; i++)
    {
        set_default_string(&pstr[i]);
    }
}
Ejemplo n.º 5
0
void set_program_defaults(void)
{
    int i;
    grdefaults = d_d;
    g = (graph *)calloc(maxgraph, sizeof(graph));
    for (i = 0; i < maxgraph; i++)
    {
        g[i].p = (plotarr *)calloc(maxplot, sizeof(plotarr));
        set_default_graph(i);
    }
    for (i = 0; i < MAXREGION; i++)
    {
        set_region_defaults(i);
    }
    set_default_annotation();
    set_default_string(&timestamp);
    alloc_blockdata(MAXPLOT);
    timestamp.x = 0.03;
    timestamp.y = 0.03;
    if (init_scratch_arrays(maxarr))
    {
        errwin("Couldn't allocate memory for scratch arrays, don't use them");
    }
}
Ejemplo n.º 6
0
void
YamlConfiguration::set_default_string(const char *path, std::string &s)
{
  set_default_string(path, s.c_str());
}
Ejemplo n.º 7
0
void set_default_ticks(tickmarks *t, int a)
{
    int i;

    t->axis = a;
    switch (a)
    {
    case X_AXIS:
    case Y_AXIS:
        t->active = ON;
        t->alt = OFF;
        t->tl_flag = ON;
        t->t_flag = ON;
        break;
    case XA_AXIS:
    case YA_AXIS:
        t->active = ON;
        t->alt = OFF;
        t->tl_flag = OFF;
        t->t_flag = OFF;
        break;
    case ZX_AXIS:
    case ZY_AXIS:
        t->active = ON;
        t->alt = OFF;
        t->tl_flag = OFF;
        t->t_flag = OFF;
        break;
    }
    set_default_string(&t->label);
    t->tmin = 0.0;
    t->tmax = 1.0;
    t->tmajor = 0.5;
    t->tminor = 0.25;
    t->offsx = 0.0;
    t->offsy = 0.0;
    t->label_layout = PARA;
    t->label_place = AUTO;
    t->tl_type = AUTO;
    t->tl_layout = HORIZONTAL;
    t->tl_sign = NORMAL;
    t->tl_prec = 1;
    t->tl_format = DECIMAL;
    t->tl_angle = 0;
    t->tl_just = (a % 2) ? RIGHT : CENTER;
    t->tl_skip = 0;
    t->tl_staggered = 0;
    t->tl_starttype = AUTO;
    t->tl_stoptype = AUTO;
    t->tl_start = 0.0;
    t->tl_stop = 0.0;
    t->tl_op = (a % 2) ? LEFT : BOTTOM;
    t->tl_vgap = 1.0;
    t->tl_hgap = 1.0;
    t->tl_font = grdefaults.font;
    t->tl_charsize = 1.0;
    t->tl_linew = grdefaults.linew;
    t->tl_color = grdefaults.color;
    t->tl_appstr[0] = 0;
    t->tl_prestr[0] = 0;
    t->t_type = AUTO;
    t->t_mflag = ON;
    t->t_integer = OFF;
    t->t_num = 6;
    t->t_inout = IN;
    t->t_log = OFF;
    t->t_op = BOTH;
    t->t_size = 1.0;
    t->t_msize = 0.5;
    t->t_drawbar = OFF;
    t->t_drawbarcolor = grdefaults.color;
    t->t_drawbarlines = grdefaults.lines;
    t->t_drawbarlinew = grdefaults.linew;
    t->t_gridflag = OFF;
    t->t_mgridflag = OFF;
    t->t_color = grdefaults.color;
    t->t_lines = grdefaults.lines;
    t->t_linew = grdefaults.linew;
    t->t_mcolor = grdefaults.color;
    t->t_mlines = grdefaults.lines;
    t->t_mlinew = grdefaults.linew;
    t->t_spec = 0;
    for (i = 0; i < MAX_TICK_LABELS; i++)
    {
        t->t_specloc[i] = 0.0;
        t->t_speclab[i].s = NULL;
    }
}