Discussion:
Multiple faults in pslegend
David Whipp
2014-07-16 10:50:57 UTC
Permalink
Hi all,

We’ve been trying to learn a bit about creating maps in GMT and have recently encountered some trouble trying to plot multiple faults in a map legend using pslegend. We’re able to plot multiples of other symbols as well as single faults, but we have some trouble when trying to plot 2 or more faults.

For example, using pslegend to plot
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
is fine, and shows the expected fault symbol in the legend (we have no problem adding a text label as well). If we try the same thing with multiple fault instances, such as
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
pslegend: GMT_psxy returned error 30.
The verbose equivalent error message for the example above is
pslegend: Processing input text table data
pslegend: GMTAPI_Init_Import: Passed family = Text Table and geometry = Non-Geographical
pslegend: GMTAPI_Init_Import: Added 0 new sources
pslegend: Object ID 0 : Registered Text Table Stream 7fff7db1f370 as an Input resource with geometry Non-Geographical [n_objects = 1]
pslegend: GMTAPI_Init_Import: Added stdin to registered sources
pslegend: GMT_Init_IO: Returned first Input object ID = 0
pslegend: GMTAPI_Begin_IO: Input resource access is now enabled [container]
pslegend: GMTAPI_Import_Textset: Passed ID = -1 and mode = 0
pslegend: Reading Text Table from Stream 7fff7db1f370
pslegend: GMT_End_IO: Input resource access is now disabled
pslegend: No legend height given, use an estimated height of 0.6 inches.
pslegend: Projected values in meters: -1.11319e+06 1.11319e+06 -1.11148e+06 1.11148e+06
pslegend: Warning: not a valid number and may not be decoded properly.
pslegend: Object ID 1 : Registered Text Table Memory Reference 7ffa51422a70 as an Input resource with geometry Point [n_objects = 2]
pslegend: Successfully created a new Text Table container
pslegend: Object ID 2 : Registered Data Table Memory Reference 7ffa51422e00 as an Input resource with geometry Line [n_objects = 3]
pslegend: Successfully created a new Data Table container
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Begin_IO: Input resource access is now enabled [container]
psxy: GMTAPI_Import_Dataset: Passed ID = 2 and mode = 0
psxy: Referencing data table from GMT_DATASET memory location
psxy: GMT_End_IO: Input resource access is now disabled
psxy: Plotting table 0 segment 0
psxy: GMT_Destroy_Data: Ignored warning 25 for object 2
pslegend: Warning: not a valid number and may not be decoded properly.
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Unregister_IO: Unregistering object no 3 [n_objects = 3]
pslegend: GMT_psxy returned error 30.
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=0 W=Input F=Text Table M=Stream S=Used P=0 D=7ffa514226b0 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=0 ID=1 W=Input F=Text Table M=Memory Reference S=Unused P=7ffa51422a70 D=7ffa51422a70 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=2 W=Input F=Data Table M=Memory Reference S=Used P=7ffa51422e00 D=7ffa51422e00 N=(null)
pslegend: GMTAPI_Garbage_Collection freed 3 memory objects
pslegend: GMTAPI_Unregister_IO: Unregistering object no 0 [n_objects = 2]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 1 [n_objects = 1]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 2 [n_objects = 0]
pslegend: Entering GMT_Destroy_Session
Anyway, we don’t know enough about GMT to determine what we need to do to resolve this error message, so we’re hoping perhaps one of you knows how we should modify our GMT script to plot multiple faults in the legend. I’ve attached a simple example script that should reproduce the multiple fault plotting issue. Must everything is commented out for now, except for an attempt to plot two faults.

Cheers,
Dave Whipp and Niclas Blomqvist


Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Paul Wessel
2014-07-16 18:08:38 UTC
Permalink
David-

I've added a new bug issue (#589) on our tracker to make sure this gets looked at. Thanks for pointing it out.

Cheers, Paul
Post by David Whipp
Hi all,
We’ve been trying to learn a bit about creating maps in GMT and have recently encountered some trouble trying to plot multiple faults in a map legend using pslegend. We’re able to plot multiples of other symbols as well as single faults, but we have some trouble when trying to plot 2 or more faults.
For example, using pslegend to plot
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
is fine, and shows the expected fault symbol in the legend (we have no problem adding a text label as well). If we try the same thing with multiple fault instances, such as
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
pslegend: GMT_psxy returned error 30.
The verbose equivalent error message for the example above is
pslegend: Processing input text table data
pslegend: GMTAPI_Init_Import: Passed family = Text Table and geometry = Non-Geographical
pslegend: GMTAPI_Init_Import: Added 0 new sources
pslegend: Object ID 0 : Registered Text Table Stream 7fff7db1f370 as an Input resource with geometry Non-Geographical [n_objects = 1]
pslegend: GMTAPI_Init_Import: Added stdin to registered sources
pslegend: GMT_Init_IO: Returned first Input object ID = 0
pslegend: GMTAPI_Begin_IO: Input resource access is now enabled [container]
pslegend: GMTAPI_Import_Textset: Passed ID = -1 and mode = 0
pslegend: Reading Text Table from Stream 7fff7db1f370
pslegend: GMT_End_IO: Input resource access is now disabled
pslegend: No legend height given, use an estimated height of 0.6 inches.
pslegend: Projected values in meters: -1.11319e+06 1.11319e+06 -1.11148e+06 1.11148e+06
pslegend: Warning: not a valid number and may not be decoded properly.
pslegend: Object ID 1 : Registered Text Table Memory Reference 7ffa51422a70 as an Input resource with geometry Point [n_objects = 2]
pslegend: Successfully created a new Text Table container
pslegend: Object ID 2 : Registered Data Table Memory Reference 7ffa51422e00 as an Input resource with geometry Line [n_objects = 3]
pslegend: Successfully created a new Data Table container
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Begin_IO: Input resource access is now enabled [container]
psxy: GMTAPI_Import_Dataset: Passed ID = 2 and mode = 0
psxy: Referencing data table from GMT_DATASET memory location
psxy: GMT_End_IO: Input resource access is now disabled
psxy: Plotting table 0 segment 0
psxy: GMT_Destroy_Data: Ignored warning 25 for object 2
pslegend: Warning: not a valid number and may not be decoded properly.
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Unregister_IO: Unregistering object no 3 [n_objects = 3]
pslegend: GMT_psxy returned error 30.
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=0 W=Input F=Text Table M=Stream S=Used P=0 D=7ffa514226b0 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=0 ID=1 W=Input F=Text Table M=Memory Reference S=Unused P=7ffa51422a70 D=7ffa51422a70 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=2 W=Input F=Data Table M=Memory Reference S=Used P=7ffa51422e00 D=7ffa51422e00 N=(null)
pslegend: GMTAPI_Garbage_Collection freed 3 memory objects
pslegend: GMTAPI_Unregister_IO: Unregistering object no 0 [n_objects = 2]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 1 [n_objects = 1]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 2 [n_objects = 0]
pslegend: Entering GMT_Destroy_Session
Anyway, we don’t know enough about GMT to determine what we need to do to resolve this error message, so we’re hoping perhaps one of you knows how we should modify our GMT script to plot multiple faults in the legend. I’ve attached a simple example script that should reproduce the multiple fault plotting issue. Must everything is commented out for now, except for an attempt to plot two faults.
Cheers,
Dave Whipp and Niclas Blomqvist
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
<pslegend_test.sh>
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Paul Wessel
2014-07-17 23:24:11 UTC
Permalink
Probably fixed in r13364. Give it a try, if not please use the tracker to report more issues.
-p
Post by Paul Wessel
David-
I've added a new bug issue (#589) on our tracker to make sure this gets looked at. Thanks for pointing it out.
Cheers, Paul
Post by David Whipp
Hi all,
We’ve been trying to learn a bit about creating maps in GMT and have recently encountered some trouble trying to plot multiple faults in a map legend using pslegend. We’re able to plot multiples of other symbols as well as single faults, but we have some trouble when trying to plot 2 or more faults.
For example, using pslegend to plot
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
is fine, and shows the expected fault symbol in the legend (we have no problem adding a text label as well). If we try the same thing with multiple fault instances, such as
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
pslegend: GMT_psxy returned error 30.
The verbose equivalent error message for the example above is
pslegend: Processing input text table data
pslegend: GMTAPI_Init_Import: Passed family = Text Table and geometry = Non-Geographical
pslegend: GMTAPI_Init_Import: Added 0 new sources
pslegend: Object ID 0 : Registered Text Table Stream 7fff7db1f370 as an Input resource with geometry Non-Geographical [n_objects = 1]
pslegend: GMTAPI_Init_Import: Added stdin to registered sources
pslegend: GMT_Init_IO: Returned first Input object ID = 0
pslegend: GMTAPI_Begin_IO: Input resource access is now enabled [container]
pslegend: GMTAPI_Import_Textset: Passed ID = -1 and mode = 0
pslegend: Reading Text Table from Stream 7fff7db1f370
pslegend: GMT_End_IO: Input resource access is now disabled
pslegend: No legend height given, use an estimated height of 0.6 inches.
pslegend: Projected values in meters: -1.11319e+06 1.11319e+06 -1.11148e+06 1.11148e+06
pslegend: Warning: not a valid number and may not be decoded properly.
pslegend: Object ID 1 : Registered Text Table Memory Reference 7ffa51422a70 as an Input resource with geometry Point [n_objects = 2]
pslegend: Successfully created a new Text Table container
pslegend: Object ID 2 : Registered Data Table Memory Reference 7ffa51422e00 as an Input resource with geometry Line [n_objects = 3]
pslegend: Successfully created a new Data Table container
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Begin_IO: Input resource access is now enabled [container]
psxy: GMTAPI_Import_Dataset: Passed ID = 2 and mode = 0
psxy: Referencing data table from GMT_DATASET memory location
psxy: GMT_End_IO: Input resource access is now disabled
psxy: Plotting table 0 segment 0
psxy: GMT_Destroy_Data: Ignored warning 25 for object 2
pslegend: Warning: not a valid number and may not be decoded properly.
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Unregister_IO: Unregistering object no 3 [n_objects = 3]
pslegend: GMT_psxy returned error 30.
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=0 W=Input F=Text Table M=Stream S=Used P=0 D=7ffa514226b0 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=0 ID=1 W=Input F=Text Table M=Memory Reference S=Unused P=7ffa51422a70 D=7ffa51422a70 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=2 W=Input F=Data Table M=Memory Reference S=Used P=7ffa51422e00 D=7ffa51422e00 N=(null)
pslegend: GMTAPI_Garbage_Collection freed 3 memory objects
pslegend: GMTAPI_Unregister_IO: Unregistering object no 0 [n_objects = 2]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 1 [n_objects = 1]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 2 [n_objects = 0]
pslegend: Entering GMT_Destroy_Session
Anyway, we don’t know enough about GMT to determine what we need to do to resolve this error message, so we’re hoping perhaps one of you knows how we should modify our GMT script to plot multiple faults in the legend. I’ve attached a simple example script that should reproduce the multiple fault plotting issue. Must everything is commented out for now, except for an attempt to plot two faults.
Cheers,
Dave Whipp and Niclas Blomqvist
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
<pslegend_test.sh>
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
David Whipp
2014-07-21 14:25:05 UTC
Permalink
Hi Paul,

Thanks for taking care of this so quickly. I can confirm that the pslegend with multiple faults is working as expected in r13381.

Cheers,
Dave
Post by Paul Wessel
Probably fixed in r13364. Give it a try, if not please use the tracker to report more issues.
-p
Post by Paul Wessel
David-
I've added a new bug issue (#589) on our tracker to make sure this gets looked at. Thanks for pointing it out.
Cheers, Paul
Post by David Whipp
Hi all,
We’ve been trying to learn a bit about creating maps in GMT and have recently encountered some trouble trying to plot multiple faults in a map legend using pslegend. We’re able to plot multiples of other symbols as well as single faults, but we have some trouble when trying to plot 2 or more faults.
For example, using pslegend to plot
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
is fine, and shows the expected fault symbol in the legend (we have no problem adding a text label as well). If we try the same thing with multiple fault instances, such as
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
S 0.1i f 0.25i/-1/0.075i 0/0/255 0.25p
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
pslegend: GMT_psxy returned error 30.
The verbose equivalent error message for the example above is
pslegend: Processing input text table data
pslegend: GMTAPI_Init_Import: Passed family = Text Table and geometry = Non-Geographical
pslegend: GMTAPI_Init_Import: Added 0 new sources
pslegend: Object ID 0 : Registered Text Table Stream 7fff7db1f370 as an Input resource with geometry Non-Geographical [n_objects = 1]
pslegend: GMTAPI_Init_Import: Added stdin to registered sources
pslegend: GMT_Init_IO: Returned first Input object ID = 0
pslegend: GMTAPI_Begin_IO: Input resource access is now enabled [container]
pslegend: GMTAPI_Import_Textset: Passed ID = -1 and mode = 0
pslegend: Reading Text Table from Stream 7fff7db1f370
pslegend: GMT_End_IO: Input resource access is now disabled
pslegend: No legend height given, use an estimated height of 0.6 inches.
pslegend: Projected values in meters: -1.11319e+06 1.11319e+06 -1.11148e+06 1.11148e+06
pslegend: Warning: not a valid number and may not be decoded properly.
pslegend: Object ID 1 : Registered Text Table Memory Reference 7ffa51422a70 as an Input resource with geometry Point [n_objects = 2]
pslegend: Successfully created a new Text Table container
pslegend: Object ID 2 : Registered Data Table Memory Reference 7ffa51422e00 as an Input resource with geometry Line [n_objects = 3]
pslegend: Successfully created a new Data Table container
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Begin_IO: Input resource access is now enabled [container]
psxy: GMTAPI_Import_Dataset: Passed ID = 2 and mode = 0
psxy: Referencing data table from GMT_DATASET memory location
psxy: GMT_End_IO: Input resource access is now disabled
psxy: Plotting table 0 segment 0
psxy: GMT_Destroy_Data: Ignored warning 25 for object 2
pslegend: Warning: not a valid number and may not be decoded properly.
psxy: History: Process -R0/5.90551/0/5.89639.
psxy: History: Process -Jx1i.
psxy: Processing input table data
psxy: Projected values in meters: 0 5.90551 0 5.89639
psxy: GMTAPI_Init_Import: Passed family = Data Table and geometry = Line
[Session pslegend (0)]: Error returned from GMT API: GMT_NOT_A_VALID_ID (30)
psxy: GMTAPI_Init_Import: Added 1 new sources
psxy: GMT_Init_IO: Returned first Input object ID = 0
psxy: GMTAPI_Unregister_IO: Unregistering object no 3 [n_objects = 3]
pslegend: GMT_psxy returned error 30.
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=0 W=Input F=Text Table M=Stream S=Used P=0 D=7ffa514226b0 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=0 ID=1 W=Input F=Text Table M=Memory Reference S=Unused P=7ffa51422a70 D=7ffa51422a70 N=(null)
pslegend: GMT_Garbage_Collection: Destroying object: C=0 A=1 ID=2 W=Input F=Data Table M=Memory Reference S=Used P=7ffa51422e00 D=7ffa51422e00 N=(null)
pslegend: GMTAPI_Garbage_Collection freed 3 memory objects
pslegend: GMTAPI_Unregister_IO: Unregistering object no 0 [n_objects = 2]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 1 [n_objects = 1]
pslegend: GMTAPI_Unregister_IO: Unregistering object no 2 [n_objects = 0]
pslegend: Entering GMT_Destroy_Session
Anyway, we don’t know enough about GMT to determine what we need to do to resolve this error message, so we’re hoping perhaps one of you knows how we should modify our GMT script to plot multiple faults in the legend. I’ve attached a simple example script that should reproduce the multiple fault plotting issue. Must everything is commented out for now, except for an attempt to plot two faults.
Cheers,
Dave Whipp and Niclas Blomqvist
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
<pslegend_test.sh>
Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
--
David M. Whipp
Assistant Professor | Dept. of Geosciences and Geography | Univ. of Helsinki
+358 (0)2 941 51617 | www.helsinki.fi/geo/staff/whipp/ | @HUGeodynamics

Mailing list for GMT discussions of all kinds. If you are not sure you have found a bug, discuss it here first.
To formally report bugs or request features, please register and add New Issue on gmt.soest.hawaii.edu
To unsubscribe, send the message "signoff gmt-help" to ***@lists.hawaii.edu
Note: gmt-help will become obsolete on Sept 1, 2014 - please use forum on gmt.soest.hawaii.edu instead.
Loading...