This routine is used to generate an axis for a graph. It draws an axis with a linear scale, places tic marks every inch, labels the tics, and uses the supplied title for the axis. More...
#include "common.h"
#include <stdio.h>
#include <math.h>
#include <string.h>
#include "vmath.h"
#include "plot3.h"
Go to the source code of this file.
Defines | |
#define | TICK_YLEN (char_width) |
tick is 1 character height | |
#define | NUM_YOFF (3*char_width) |
numbers offset from line | |
#define | TITLE_YOFF (5*char_width) |
title offset from line | |
Functions | |
void | tp_3axis (FILE *fp, char *string, fastf_t *origin, fastf_t *rot, double length, int ccw, int ndigits, double label_start, double label_incr, double tick_separation, double char_width) |
void | PL_FORTRAN (f3axis, F3AXIS) |
This routine is used to generate an axis for a graph. It draws an axis with a linear scale, places tic marks every inch, labels the tics, and uses the supplied title for the axis.
The strategy behind this routine is to split the axis into SEGMENTS, which run from one tick to the next. The origin of the first segment (x, y), the origin of the bottom of the first tick (xbott, ybott), and the origin of the first tick label (xnum, ynum) are computed along with the delta x and delta y (xincr, yincr) which describes the interval to the start of the next tick.
Originally written on August 01, 1978
Definition in file axis.c.
#define TICK_YLEN (char_width) |
#define NUM_YOFF (3*char_width) |
#define TITLE_YOFF (5*char_width) |
void tp_3axis | ( | FILE * | fp, | |
char * | string, | |||
fastf_t * | origin, | |||
fastf_t * | rot, | |||
double | length, | |||
int | ccw, | |||
int | ndigits, | |||
double | label_start, | |||
double | label_incr, | |||
double | tick_separation, | |||
double | char_width | |||
) |
fp | output file | |
string | label for axis | |
origin | simple 3d point | |
rot | rotation angle | |
length | length of axis | |
ccw | 0=clockwise, !0=counter clockwise (ccw) | |
ndigits | # digits wide | |
label_start | label starting value | |
label_incr | label increment between ticks | |
tick_separation | plot distance between ticks | |
char_width | character scale (size) |
Definition at line 56 of file axis.c.
References bn_mat_mul(), MAT4X3PNT, MAT4X3VEC, MAT_DELTAS_VEC, MAT_IDN, NUM_YOFF, pdv_3cont(), pdv_3move(), TICK_YLEN, TITLE_YOFF, tp_3symbol(), VADD2, VDOT, VJOIN1, VMOVE, VSCALE, VSET, VSUB2, X, and ZERO.
Referenced by PL_FORTRAN().