+
+void graph_set_xaxis(Graph *g, struct graph_axis *axis) {
+ if(g->xaxis != NULL) {
+ free(g->xaxis);
+ }
+ g->xaxis=axis;
+}
+void graph_set_yaxis(Graph *g, struct graph_axis *axis) {
+ if(g->yaxis != NULL) {
+ free(g->yaxis);
+ }
+ g->yaxis=axis;
+}
+
+void graph_autoset_xaxis(Graph *g) {
+ struct graph_axis *axis;
+ if((axis=(struct graph_axis *)malloc(sizeof(struct graph_axis))) == NULL) {
+ return 1;
+ }
+ graph_set_xaxis(g, axis);
+}
+
+void graph_autoset_yaxis(Graph *g) {
+ struct graph_axis *axis;
+ if((axis=(struct graph_axis *)malloc(sizeof(struct graph_axis))) == NULL) {
+ return 1;
+ }
+ graph_set_xaxis(g, axis);
+}