Skip to content

Commit cd08677

Browse files
committed
An attempt to fix the disappearing -Z-axis issue #8812
Named as "attempt" because I got a quite strange failure in ex08 where even the 3D bars are slightly different (?????) Assisted-by: Claude Sonnet 4.6
1 parent 1c9c15e commit cd08677

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/gmt_plot.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6838,12 +6838,12 @@ void gmt_vertical_axis (struct GMT_CTRL *GMT, unsigned int mode) {
68386838
if (z_axis[k] == 0) continue; /* Not drawing this vertical axis */
68396839
quadrant = corner_to_quadrant[k+1]; /* Given corner (k+1), return quadrant */
68406840
below = gmtplot_z_axis_side (GMT, k, GMT->current.proj.z_project.quadrant);
6841-
gmt_xyz_to_xy (GMT, nesw[(quadrant/2*2+1)%4], nesw[((quadrant+1)/2*2)%4], GMT->common.R.wesn[ZLO], &xx, &yy);
6841+
gmt_xyz_to_xy (GMT, nesw[(quadrant/2*2+1)%4], nesw[((quadrant+1)/2*2)%4], GMT->current.proj.zmin, &xx, &yy);
68426842
/* Restrict reduced azimuth to -45 to 45 range */
68436843
az = GMT->current.proj.z_project.view_azimuth - 90.0 - floor ((GMT->current.proj.z_project.view_azimuth - 45.0) / 90.0) * 90.0;
68446844
PSL_command (PSL, "/PSL_GPP matrix currentmatrix def [%.12g %.12g %.12g %.12g %.12g %.12g] concat\n",
68456845
cosd(az), sind(az) * GMT->current.proj.z_project.sin_el, 0.0, GMT->current.proj.z_project.cos_el, xx * PSL->internal.x2ix, yy * PSL->internal.y2iy);
6846-
gmt_xy_axis (GMT, 0.0, -GMT->common.R.wesn[ZLO], GMT->current.proj.zmax - GMT->current.proj.zmin, GMT->common.R.wesn[ZLO],
6846+
gmt_xy_axis (GMT, 0.0, 0.0, GMT->current.proj.zmax - GMT->current.proj.zmin, GMT->common.R.wesn[ZLO],
68476847
GMT->common.R.wesn[ZHI], &GMT->current.map.frame.axis[GMT_Z], below, GMT->current.map.frame.side[Z_SIDE]);
68486848
PSL_command (PSL, "PSL_GPP setmatrix\n"); /* Return to normal current transformation matrix */
68496849
}

0 commit comments

Comments
 (0)