| 756 | } |
| 757 | |
| 758 | GMT_LOCAL void gmtplot_lineary_grid (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double w, double e, double s, double n, double dval) { |
| 759 | double *y = NULL; |
| 760 | char *type = (gmt_M_y_is_lat (GMT, GMT_IN)) ? "parallel" : "y"; |
| 761 | unsigned int i, ny = 0; |
| 762 | |
| 763 | if (GMT->current.proj.z_down) { |
| 764 | if (GMT->current.proj.z_down == GMT_ZDOWN_Z) /* z = n - r */ |
| 765 | ny = gmtlib_linear_array (GMT, 0.0, GMT->current.proj.z_radius-s, dval, GMT->current.map.frame.axis[GMT_Y].phase, &y); |
| 766 | else if (GMT->current.proj.z_down == GMT_ZDOWN_ZP) /* z = n - r */ |
| 767 | ny = gmtlib_linear_array (GMT, GMT->current.proj.z_radius-n, GMT->current.proj.z_radius-s, dval, GMT->current.map.frame.axis[GMT_Y].phase, &y); |
| 768 | for (i = 0; i < ny; i++) { |
| 769 | if (GMT->current.proj.z_down == GMT_ZDOWN_ZP) |
| 770 | y[i] = GMT->current.proj.z_radius - y[i]; /* These are the z values needed for positioning */ |
| 771 | else |
| 772 | y[i] = GMT->common.R.wesn[YHI] - y[i]; /* These are the radial values needed for positioning */ |
| 773 | } |
| 774 | } |
| 775 | else |
| 776 | ny = gmtlib_linear_array (GMT, s, n, dval, GMT->current.map.frame.axis[GMT_Y].phase, &y); |
| 777 | for (i = 0; i < ny; i++) { |
| 778 | GMT_Report (GMT->parent, GMT_MSG_DEBUG, "Draw %s = %g from %g to %g\n", type, y[i], w, e); |
| 779 | gmtplot_map_latline (GMT, PSL, y[i], w, e); |
| 780 | } |
| 781 | if (ny) gmt_M_free (GMT, y); |
| 782 | |
| 783 | } |
| 784 | |
| 785 | GMT_LOCAL void gmtplot_x_grid (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double s, double n, double *x, unsigned int nx) { |
| 786 | unsigned int i; |
no test coverage detected