Closed kojix2 closed 4 years ago
Hello,
the gr_
and gks_
sets of functions are for two libraries with different aims:
As a result, there are a few cases where the APIs may look very similar but may behave differently. In general, I would recommend sticking to the gr API for your code.
Thank you @FlorianRhiem.
I use GR modules from Ruby and Julia. I don't use GKS. But look at the example below.
https://github.com/sciapp/gr/issues/39
gr_cellarray(-0.5, 3.5, 3.5, -0.5, 4, 4, 1, 1, 4, 4, colia);
ymin is greater than ymax. Isn't this a little strange?
Not really, in this case the top row of the image is positioned at -0.5 and the bottom row is positioned at 3.5, which means that the image will appear upside-down. I think this was the aim in the example. Alternatively you could reverse the image rows themselves instead of swapping ymin and ymax.
Hmm. I still don't understand. I feel something is wrong.
I think the problem there is that you're trying to draw a cellarray between xmin=-0.5 and xmax=-0.5, so it would have a width of 0 and would be invisible.
I see. Now I understand. Sorry for the trouble you. Thank you.
Hello. I'm new to gr-framework. I doubt that something is wrong with
gr_cellarray
andgks_cellarray
.gr.c https://github.com/sciapp/gr/blob/494f193a9120957cb85222727260da2de70682f2/lib/gr/gr.c#L1720-L1723
https://github.com/sciapp/gr/blob/494f193a9120957cb85222727260da2de70682f2/lib/gr/gr.c#L1734
https://github.com/sciapp/gr/blob/494f193a9120957cb85222727260da2de70682f2/lib/gr/gr.c#L1739
working example https://github.com/sciapp/gr/issues/39#issuecomment-301684973
The direction of the Y axis may be opposite for gr and gks. Even so, it seems somehow inconsistent.
I'm sorry if I'm wrong.