MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / gmtplot_x_grid

Function gmtplot_x_grid

src/gmt_plot.c:785–798  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

783}
784
785GMT_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;
787 double x1, y1, x2, y2;
788
789 for (i = 0; i < nx; i++) {
790 if (gmt_M_x_is_lon (GMT, GMT_IN))
791 gmtplot_map_lonline (GMT, PSL, x[i], s, n);
792 else {
793 gmt_geo_to_xy (GMT, x[i], s, &x1, &y1);
794 gmt_geo_to_xy (GMT, x[i], n, &x2, &y2);
795 PSL_plotsegment (PSL, x1, y1, x2, y2);
796 }
797 }
798}
799
800GMT_LOCAL void gmtplot_lineary_oblgrid (struct GMT_CTRL *GMT, struct PSL_CTRL *PSL, double w, double e, double s, double n, double dval) {
801 /* y gridlines in oblique coordinates for all but the Oblique Mercator projection [which already is oblique] */

Callers 4

gmt_plot_timex_gridFunction · 0.85
gmtplot_logx_gridFunction · 0.85
gmtplot_powx_gridFunction · 0.85
gmtplot_map_gridlinesFunction · 0.85

Calls 3

gmtplot_map_lonlineFunction · 0.85
gmt_geo_to_xyFunction · 0.85
PSL_plotsegmentFunction · 0.85

Tested by

no test coverage detected