Hi,
following your suggestion I create a file mycross.def as
N: 1 a # Expect variable azimuth as an extra argument
$1 O # Rotate coordinate system by this azimuth
0 0 + # Plot the plus symbol after rotation
and tried to plot them as
datatmp=null_sel[[‘lon_pp’,‘lat_pp’,‘baz’]]
fig.plot(data=datatmp,
style=“kmycross/1c”, pen=“thin,+z”,
zvalue=null_sel.baz.array,
cmap=‘cmapBAZ.cpt’)
but I get this error
plot [ERROR]: Failed to parse symbol commands in file mycross.def
plot [ERROR]: Offending line: $1 O # Rotate coordinate system by this azimuth
plot [ERROR]: Option -S: Parsing failure
GMTCLibError Traceback (most recent call last)
in
71 datatmp=null_sel[[‘lon_pp’,‘lat_pp’,‘baz’]]
72 #print(datatmp)
—> 73 fig.plot(data=datatmp,
74 style=“kmycross/1c”, pen=“thin,+z”,
75 zvalue=null_sel.baz.array,
~/anaconda3/envs/pygmt/lib/python3.9/site-packages/pygmt/helpers/decorators.py in new_module(*args, **kwargs)
286 if alias in kwargs:
287 kwargs[arg] = kwargs.pop(alias)
→ 288 return module_func(*args, **kwargs)
289
290 new_module.aliases = aliases
~/anaconda3/envs/pygmt/lib/python3.9/site-packages/pygmt/helpers/decorators.py in new_module(*args, **kwargs)
430 kwargs[arg] = separators[fmt].join(f"{item}" for item in value)
431 # Execute the original function and return its output
→ 432 return module_func(*args, **kwargs)
433
434 return new_module
~/anaconda3/envs/pygmt/lib/python3.9/site-packages/pygmt/src/plot.py in plot(self, x, y, data, sizes, direction, **kwargs)
231 with file_context as fname:
232 arg_str = " ".join([fname, build_arg_string(kwargs)])
→ 233 lib.call_module(“plot”, arg_str)
~/anaconda3/envs/pygmt/lib/python3.9/site-packages/pygmt/clib/session.py in call_module(self, module, args)
502 )
503 if status != 0:
→ 504 raise GMTCLibError(
505 “Module ‘{}’ failed with status code {}:\n{}”.format(
506 module, status, self._error_message
GMTCLibError: Module ‘plot’ failed with status code 71:
plot [ERROR]: Failed to parse symbol commands in file mycross.def
plot [ERROR]: Offending line: $1 O # Rotate coordinate system by this azimuth
plot [ERROR]: Option -S: Parsing failure
The same errors I get using your rot.def symbol.
Am I missing something in the plot option? or do you know what is the problem??
Simone