-
Notifications
You must be signed in to change notification settings - Fork 401
Add the so wished option to plot spheres in psxyz. #8844
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
Conversation
They aren't really spheres but circles in 3D plots. This is mostly a Claude.ai creation but a one that needed a lot of baby-sitting development.
Esteban82
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great feature!!!
It worked on my pc.
Just some comments.
- Is it needed to include this feature in
psxy.c? - The simulate shading does not affect the outline, right?
|
I wondered about psxy.c too but this is a (pseudo) 3D feature so don't see the interest of it in there where we can do almost all of this with circles (except gradient). The outline is controlled by -W so no shadings in it (and this was a BIG fight with Claude to make it do that). |
Ok. Fine by me. About the letter (-SQ) I think that the capital |
|
Yes, that's a good idea. |
|
Ok. I will I modify the code. |
|
Looks fine. Do you forget to update the |
|
| char symbol_type, txt_a[GMT_LEN256] = {""}, txt_b[GMT_LEN256] = {""}, txt_c[GMT_LEN256] = {""}, txt_d[GMT_LEN256] = {""}; | ||
| char text_cp[GMT_LEN256] = {""}, diameter[GMT_LEN32] = {""}, *c = NULL; | ||
| static char *allowed_symbols[2] = {"~=-+AaBbCcDdEefGgHhIiJjMmNnpqRrSsTtVvWwxy", "=-+AabCcDdEefGgHhIiJjMmNnOopqRrSsTtUuVvWwxy"}; | ||
| static char *allowed_symbols[2] = {"~=-+AaBbCcDdEefGgHhIiJjMmNnpQqRrSsTtVvWwxy", "=-+AabCcDdEefGgHhIiJjMmNnOopQqRrSsTtUuVvWwxy"}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am not sure, but should I replace here the Q with P?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think so.
|
Don't do it. There are more things to change. And |
|
@seisman can you please add the test/psxyz/sphere.sh PS to DVC? |
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)DetailsAdded imagesModified images
Report last updated at commit e544ec1 |
| GMT_Usage (API, 3, "+a Set light source azimuth [0, from the right]."); | ||
| GMT_Usage (API, 3, "+e Set light source elevation [90, perpendicular to viewing plane]."); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
|
The vertical bar in the example actually reveals a bug in the implementation. Modern and Classic modes are not giving the same thing. Whilst modern mode works: the classic somehow screw the axis and shows only that vertical bar. |
No. I mentioned that in my first post. And asked opinions if it really worth to exist as option. I still think yes but meanwhile other things came up and I left them in the state they are. |
I think they're useful and should be implemented. |
|
I updated the test. Turns out that the vertical bar issue is independent of the changes in this PR. See #8845 |
Is it? I'm not even so sure on what to expect. I would say that the expectation would be to have the bright point at 45º |
Oddly the PS seem right but conversion to raster flips spheres upside-down.
I got the same result. |
|
I will merge this PR as is since this flipping issue seems even a Ghostscript thing. Will try to investigate it later. |




They aren't really spheres but circles in 3D plots.
This is mostly a Claude.ai creation but a one that needed a lot of baby-sitting development.
Claude picked -SQ for this option and I honestly couldn't think of a better alternative, though -Sq is a decorated line and -SQ has nothing to do with it. Ideas for a better syntax are welcome. The following is the summary prepared by Claude
The +a and +e are not working correctly and I'm not even sure that we should have them. Opinions?
A low imagination example (used in the learning work) is: