import pygmt
x = ['2008-01-01', '2012-01-01']
y = [5, 5]
fig = pygmt.Figure()
fig.plot(x, y, J='X10c/5c', R='2005-01-01/2015-01-01/0/10', B=True, W='2p')
fig.show(method='external')
Traceback (most recent call last):
File "test.py", line 7, in <module>
fig.plot(x, y, J='X10c/5c', R='2005-01-01/2015/01-01/0/10', B=True, W='2p')
File "/Users/seisman/Gits/gmt/gmt-python/gmt/helpers/decorators.py", line 199, in new_module
return module_func(*args, **kwargs)
File "/Users/seisman/Gits/gmt/gmt-python/gmt/helpers/decorators.py", line 294, in new_module
return module_func(*args, **kwargs)
File "/Users/seisman/Gits/gmt/gmt-python/gmt/base_plotting.py", line 344, in plot
with file_context as fname:
File "/Users/seisman/.anaconda/lib/python3.7/contextlib.py", line 112, in __enter__
return next(self.gen)
File "/Users/seisman/Gits/gmt/gmt-python/gmt/clib/session.py", line 1067, in virtualfile_from_vectors
self.put_vector(dataset, column=col, vector=array)
File "/Users/seisman/Gits/gmt/gmt-python/gmt/clib/session.py", line 754, in put_vector
gmt_type = self._check_dtype_and_dim(vector, ndim=1)
File "/Users/seisman/Gits/gmt/gmt-python/gmt/clib/session.py", line 703, in _check_dtype_and_dim
"Unsupported numpy data type '{}'.".format(array.dtype.name)
gmt.exceptions.GMTInvalidInput: Unsupported numpy data type 'str320'.
Description of the problem
I want to plot some datetime data on a map. However, gmt-python doesn't accept string as input.
Full code that generated the error
Full error message
System information
conda listbelow:output of conda list