| 1968 | } |
| 1969 | |
| 1970 | GMT_LOCAL int gmtplot_save_current_gridlines (struct GMT_CTRL *GMT) { |
| 1971 | /* If only primary gridlines are drawn, we save information to gmt.history */ |
| 1972 | |
| 1973 | if (!(GMT->current.map.frame.axis[GMT_X].item[GMT_GRID_UPPER].active || GMT->current.map.frame.axis[GMT_Y].item[GMT_GRID_UPPER].active)) return (GMT_NOERROR); /* Primary gridlines not selected, so bail */ |
| 1974 | if (GMT->current.map.frame.axis[GMT_X].item[GMT_GRID_LOWER].active || GMT->current.map.frame.axis[GMT_Y].item[GMT_GRID_LOWER].active) return (GMT_NOERROR); /* Secondary gridlines selected, so bail */ |
| 1975 | |
| 1976 | GMT->current.plot.gridline_spacing[GMT_X] = gmtlib_get_map_interval (GMT, GMT->current.map.frame.axis[GMT_X].type, &GMT->current.map.frame.axis[GMT_X].item[GMT_GRID_UPPER]); |
| 1977 | GMT->current.plot.gridline_spacing[GMT_Y] = gmtlib_get_map_interval (GMT, GMT->current.map.frame.axis[GMT_Y].type, &GMT->current.map.frame.axis[GMT_Y].item[GMT_GRID_UPPER]); |
| 1978 | GMT_Report (GMT->parent, GMT_MSG_INFORMATION, "Save current gridline information to gmt.history\n"); |
| 1979 | return (GMT_NOERROR); |
| 1980 | } |
| 1981 | |
| 1982 | GMT_LOCAL int gmtplot_get_current_gridlines (struct GMT_CTRL *GMT, double *dx, double *dy) { |
| 1983 | /* Obtain the previous gridline intervals, if nonzero */ |
no test coverage detected