GenericMappingTools / gmt

The Generic Mapping Tools
https://www.generic-mapping-tools.org
Other
848 stars 355 forks source link

Add coordinate system scaling to custom symbols #5213

Open uleysky opened 3 years ago

uleysky commented 3 years ago

Perhaps I did not read the documentation carefully, but I did not find the possibility of scaling the coordinate system in custom symbols code. There is rotation, but no scaling. This would be a useful feature, for example, for drawing arcs of ellipses. It might be worth adding the clip option as well.

Also, file insertion is not well documented. It is not clear how the "x", "y" and "size" parameters of the EPS command relate to the BoundingBox of EPS.

PaulWessel commented 3 years ago
  1. The coordinate system for custom symbols are normalized to [-1/1/-1/1]. This is then scaled via the size argument given to -S.
  2. For EPS: The x/y refers to the center of the symbol (which is assumed but not required to be square) and the size sets the plot size of that square symbol.

Let me know if I misunderstood you.

uleysky commented 3 years ago
  1. I mean the PostScript analogue of the "scale" operator to scale independently on both axes. The classic way to get an elliptical arc is to take a circular arc and scale it along one of the axes. This is possible in PostScript, but not in custom symbols.
  2. x, y and size are in symbol coordinates, right? But how is the center of the EPS file determined, which will be at the point x, y and the size of this file? Or, in other words, given "x", "y" and "size", what are the coordinates of a point in the symbol coordinate system, if its coordinates are X, Y in the EPS file?
joa-quim commented 6 months ago

@uleysky Would you consider doing a PR for this?