parameter parsing in custom symbol "marc"
I am trying to parse a parameter in a custom symbol using a math arc (m). When I specify the start and finish angles directly it works as expected, but when parsing from the parameters using $x it does not work.
I attach the symbol definitions with and without parsing, and the outputs.
Using release 17850
Thanks Jose. This needs some deeper thinking. I agree that all the symbols that take angles should be able to accept variables, but this is not presently implemented. It makes no sense to use variables for sizes since the symbol scales everything up, but the angles need to be more flexible. I need to come up with a scheme for this, hopefully tomorrow.
- File geologic_symbols.pdf added
Now it works as expected. I send you a figure with the symbols I am doing (the number 5 shows the arc with the angle parsed). I need to incorporate around a dozen more but finally we will have the most relevant symbols used in geological mapping available in GMT! something that neither the specialized GIS have.
Is it ok if I share them through the GMT forums? Do you think that they could be incorporated into the distributed GMT custom symbols?
All the best
Beautiful. Sure, you can share on the forum but I think we can do better by adding a Resources tab on our wiki and place such symbols. I will see what I can do [teaching this morning]. Meanwhile, keep at it and I will work on a solution for this. For instance, we have not yet put up the biological symbols someone made for GMT4 macros [http://gmt.soest.hawaii.edu/gmt4/gmt/contrib/gmt_cetaceans.html] so a Resource page is overdue.
But we already have one place for this.
Just letting you know that in r17901 I allow the argument to -W inside macros to be either a typical pen thickness (e.g., 0.5p), and normalized pen thickness (0-1, e.g., -W0.02) which becomes scaled by the symbol size, or a variable (e.g., -W$1) which is replaced at run-time by that data column. It may be better to have normalized pen thicknesses sometimes so that they scale with the symbol size.
Thank you very much Paul. The more the flexibility of the macros the crazier the things we can think of!
Another useful addition could be the capacity to fix the fill of a polygon or symbol to the same color of the employed pen. For example, I have done an arrow with a line and a triangle and in order to have the triangle filled I have to use -G in psxy, which affects too to the other symbols and text (the other option is to fix the color in the macro). It would be great if the fill of the triangle could be assigned to the color of the pen used with something like "-Gpen" in the macro.
All the best