GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

Space on labels #388

Closed marcelobianchi closed 4 years ago

marcelobianchi commented 4 years ago

Dear Developers & Users,

When plotting data with labels to later building up a legend, the "labels" cannot have spaces. For example, this code:

F = pygmt.Figure()
F.plot(0,0,B=["x1","y1"],J="X10",S="c0.2",R=[-1,1,-1,1], l = "Super Point")
F.legend(None)
F.show()

Fails with the following error code:

....

    498             raise GMTCLibError(
    499                 "Module '{}' failed with status code {}:\n{}".format(
--> 500                     module, status, self._error_message
    501                 )
    502             )

GMTCLibError: Module 'plot' failed with status code 71:
plot [ERROR]: Error for input file: No such file (Point')

When a label is a string without spaces, everything works as expected. This was last tested on version #af26f4.

Kind regards,

Mb.

welcome[bot] commented 4 years ago

👋 Thanks for opening your first issue here! Please make sure you filled out the template with as much detail as possible. You might also want to take a look at our contributing guidelines and code of conduct.

seisman commented 4 years ago

Duplicate of #247. I think currently you have to use l='"Super Point"'.