File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -1618,6 +1618,12 @@ def virtualfile_from_stringio(self, stringio: io.StringIO):
1618
1618
Store the contents of a :class:`io.StringIO` object in a GMT_DATASET container
1619
1619
and create a virtual file to pass to a GMT module.
1620
1620
1621
+ For simplicity, currently we make following assumptions in the stringio object
1622
+
1623
+ - ``"#"`` indicates a comment line.
1624
+ - ``">"`` indicates a segment header.
1625
+ - The object only contains one table and one segment.
1626
+
1621
1627
Parameters
1622
1628
----------
1623
1629
stringio
@@ -1633,6 +1639,7 @@ def virtualfile_from_stringio(self, stringio: io.StringIO):
1633
1639
--------
1634
1640
>>> import io
1635
1641
>>> from pygmt.clib import Session
1642
+ >>> # A StringIO object containing legend specifications
1636
1643
>>> stringio = io.StringIO(
1637
1644
... "# Comment\n"
1638
1645
... "H 24p Legend\n"
@@ -1648,10 +1655,6 @@ def virtualfile_from_stringio(self, stringio: io.StringIO):
1648
1655
2 S 0.1i c 0.15i p300/12 0.25p 0.3i My circle
1649
1656
"""
1650
1657
# Parse the strings in the io.StringIO object.
1651
- # For simplicity, we make a few assumptions.
1652
- # - "#" indicates a comment line
1653
- # - ">" indicates a segment header
1654
- # - Only one table and one segment
1655
1658
header = None
1656
1659
string_arrays = []
1657
1660
for line in stringio .getvalue ().splitlines ():
You can’t perform that action at this time.
0 commit comments