Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PGPT with some symbols draws extra lines between points #66

Open
xspector opened this issue Dec 10, 2024 · 2 comments
Open

PGPT with some symbols draws extra lines between points #66

xspector opened this issue Dec 10, 2024 · 2 comments

Comments

@xspector
Copy link

Using PGPT with symbols 4, 8, 10, 20-27 causes extra lines to be drawn between the points. The reason is that cairo_arc starts by drawing a line from the current position to the start of the arc requested. The solution is to call cairo_new_sub_path before the call to cairo_arc.

To fix this change in giza-points.c the routines _giza_point, _giza_rect_concave, and giza_circle_size. Note that in _giza_circle you could also replace the call to cairo_move_to by cairo_new_sub_path for simplicity and code parellelism.

The diff between fixed and original versions of giza-points.c is
411d410
< cairo_new_sub_path (Dev[id].context);
446d444
< cairo_new_sub_path(Dev[id].context);
531d528
< cairo_new_sub_path (Dev[id].context);

@danieljprice
Copy link
Owner

Thanks very much for reporting this, will patch and fix.

May I ask from your username if you've had success using Xspec with Giza as the backend?

@xspector
Copy link
Author

Yes, I have been able to use xspec with giza plotting. There was a speed problem when plotting error bars for spectra with tens of thousands of bins but I was able to fix that in our code. We were using PGMOVE and PGDRAW instead of PGERRX and PGERRY, doubtless for historical reasons. I still have an issue with plotting to eg postscript files when I end up with three pages (blank page, plot, blank page) which I have not worked out yet. The only other problem I know about does not matter for xspec but when plotting multiple images in the same page only the first appears. I need to make simple standalone program to illustrate this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants