Error bar clipping with log axis

Hi, I’m using GMT 6.0.0 to plot data with errors in both axes. Ideally I would like to see the error bars peeking into the plotting area even if the point lays outside. Consider the example, where data.xydxdy is:

1 120   0.5 40
2  50   0.5 30
3  20   0.5 10
4   5   0.5  3
5   2   0.5  2
6   1.2 0.5  1
7   0.8 0.5  1
8   0.3 0.5  1

and plotting with:

#!/bin/bash
OUTPUT=GMT_bug.ps
gmt psbasemap -R0/10/1e0/1e2 -Jx0.20i/1.0il -Xc -Yc -BneWS -Bxa5f -Bya1f3p -K > $OUTPUT
gmt psxy data.xydxdy -J -R -Wthick -Exy0i/thick -Sc.0001i -N -O >> $OUTPUT

I get this:

this plots full symbols outside the plotting box, while I would like just the part of the error bar within the plotting box to be visible. Removing the -N option of psxy simply skips all points outside the box. I also note that some of the outside symbols are plotted only partially, that may be a bug.

Thanks for your help and suggestions.

Pasquale

1 Like

Yes, there is some buggy behavior here. The outside horizontal bars are the parts that were not clipped of crosses that otherwise had their vertical bars clipped.

Thanks for pointing this out. Fixed in master. Please post bug reports on GitHub instead as it is easier to track progress there.

Thank you very much, outstanding work.