Closed Esteban82 closed 3 months ago
Maybe the indentation is incorrect? Try this:
.. gmtplot::
gmt begin line2 png
gmt plot -Ra -JX10c -Baf -W <<- EOF
1,8
1,8
EOF
gmt end show
No, it didn't work. The indentaion is fine. I try with data from the cache and it worked.
.. gmtplot::
gmt begin line2 png
gmt plot -Ra -JX10c -Baf -W @tut_data.txt
gmt end show
It should be either
.. gmtplot::
gmt begin line2 png
gmt plot -R0/10/0/10 -JX10c -Baf -W <<- 'EOF'
1,8
1,8
EOF
gmt end show
or
.. gmtplot::
gmt begin line2 png
gmt plot -R0/10/0/10 -JX10c -Baf -W <<- 'EOF'
1,8
1,8
EOF
gmt end show
It didn't work on my pc.
I got this:
Remember that that those EOF constructs do not work on pure Windows, which for a beginner's tutorial is not the best thing. I would prefer to have examples that are OS agnostic.
Ok, I agree.
So what method should we use? tell the users to create a txt file with the data?
It's not pretty but we can use a double echo x1 y1 > file; echo x2 y2 >> file
. But ideally should be some sort of gmtmath
command.
Remember that that those EOF constructs do not work on pure Windows, which for a beginner's tutorial is not the best thing. I would prefer to have examples that are OS agnostic.
It's possible to use Sphinx-design's tab
directive to have scripts for both Unix and Windows.
But ideally should be some sort of
gmtmath
command.
gmtmath
is likely one of the most complicated modules that users rarely use, so it's not a good idea to use it in tutorials.
It's not pretty but we can use a double
echo x1 y1 > file; echo x2 y2 >> file
.
This worked. I would prefer a method with cat
I am making a tutorial about lines. I want to use some data created on the fly (as in the pygmt).
How can I do it? @seisman do you know?
I try the following but it fails:
I think this are the messages related to those lines: