Conversation
This example highlights simple loops in building large subplots.
| echo ${lon} ${lat} | gmt plot -Skcity/0.25c -Gred -W0.5p -B0 | ||
| done < $data | ||
| gmt subplot end | ||
| gmt end show |
There was a problem hiding this comment.
The PS file is so large (> 10 Mb).
There was a problem hiding this comment.
I know. And that is after I dumbed it down to 6 minutes. As long as we store PS originals I am not sure what we can do about that - never show anything of high resolution? Thoughts?
There was a problem hiding this comment.
Perhaps it's time to use the DVC workflow in the GMT project. The DVC workflow is being used in the PyGMT project. It stores all static images (PNG for PyGMT) on another server, and works pretty well for PyGMT. @meghanrjones Thoughts?
There was a problem hiding this comment.
BTW, the PNG version of the above was 11 Mb so I made a JPG (3.7M). Both at 300 dpi default psconvert output.
There was a problem hiding this comment.
I agree that DVC would be a good solution to the PS size issue @seisman. It would require buy-in from all the core developers since it is one more tool to learn for them and would increase the learning curve a bit for new contributors.
|
Note that if I try to be space clever and do this in a much more complicated way: Then it takes way (10x) longer (due to the grdmask step) and bud does make the PS about 6 Mb (due to a single rather than two grdimage calls). I think we don't want to make things complicated when the elegant and faster solution is so much better. |
|
You know that in my opinion the GMT repo is already too huge due to PSs ... |
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
|
@meghanrjones, I got an email from git about the DISABLE_TEST suggestions but when I click and get here I do not see anything? |
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
|
I think we should also remove the ex53.ps file because it's not used in the tests ( |
Yes, I think this is the best intermediate solution. But I did not suggest the proper way to include the static image, so some revisions are still needed in addition to removing the ps file. Also the tests need to be instructed to skip for |
There was a problem hiding this comment.
I tested that the tests pass and docs build correctly locally with the suggested line changes and the additional changes below.
In doc/rst/source/gallery.rst change
{% for i in range(1, no_of_examples + 1) %}
{% set i = '%02d' % i %}
- .. figure:: /_images/ex{{i}}.*
:target: ./gallery/ex{{i}}.html
:ref:`example_{{i}}`
{% endfor %}
to
{% for i in range(1, 53) %}
{% set i = '%02d' % i %}
- .. figure:: /_images/ex{{i}}.*
:target: ./gallery/ex{{i}}.html
:ref:`example_{{i}}`
{% endfor %}
- .. figure:: https://user-images.githubusercontent.com/14077947/123172626-62ca6880-d44b-11eb-8d91-21e448930460.png
:target: ./gallery/ex53.html
:ref:`example_53`
- Add GMT_DISABLE_TEST lines to gmtest.in
- remove doc/examples/ex53/ex53.ps
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
Co-authored-by: Meghan Jones <meghanj@alum.mit.edu>
|
I see a black rectangle over the bottom half of the PNG figure in vercel... |
It looks OK for me. |
|
OK, then. Shall we squash and merge? |
|
Don't forget to remove the huge PS file! |
|
Squash and merge when you feel ready. |
Description of proposed changes
The new example illustrates two useful techniques, one that is new in master:
I dumbed the plots down to using the 6m global grids since any courser makes it look weak. The plot using 2m data looks like below:
Note I also fixed some typos in many of the *.def files hence the many changed files.