Skip to content

Conversation

@gd-a
Copy link
Contributor

@gd-a gd-a commented Dec 15, 2020

For the y- and z-axes, arbitrary angles are not allowed but +an and +ap specify annotations normal [Default] and parallel to the axis.

Somehow related to this :

I have a plot with Y calendar axis going down (January at the top, December at the bottom). I wanted to add a secondary Y-axis with the "year", but it takes to much space horizontally and the -Bys+ap gives the "year" written from bottom to top (opposite direction / you tilt your head to the left to read it).
With an arbitrary angle, one could easily do -Bys+a270 to have it correctly written...

Is it possible to add the feature ?
Thanks

PaulWessel and others added 30 commits July 9, 2020 10:21
* Fix bugs in duplication of CPTs

The API functions to duplicate a CPT had double allocations and freeing of strings using the wrong functions.

* Update gmt_support.c

* Update gmt_support.c

* Missing -h in docs

* Add named constants
Somehow, we never checked the correlation between x and y to know which sign to assign to the absolute value of teh slope.  This PR fixes taht and needs backporting to 6.1.
* Only make tiny adjustments to dx and dy if both need it

We have a roundoff-patrol checker that looks to see if an geograic grid increment is close to a multiple of integer seconds or minutes.  if it is close enough then we set it to the exact.  however, the case that triggered this discussion was close enough to 3s in x but not in y.  I think we should at least require both increments to be adjusted or neighter, and possibly tighten the decision when to do this.

* Update gmt_grdio.c

Co-authored-by: Paul Wessel <[email protected]>
* Add new keyword for refresh frequency

* use o for month as elsewhere

* Rearrange datasets

* Update remote-data.rst

* Fix mem leaking when module called another module

* Update doc/rst/source/datasets/remote-data.rst

* Update doc/rst/source/datasets/remote-data.rst

* Update heading levels

* Update remote-data.rst

* Update name of new parameter

GMT_DATA_UPDATE_INTERVAL

* List all datasets

* add logos

* Add horizontal rules between datasets

* Add NASA logo and revise placements

Co-authored-by: Dongdong Tian <[email protected]>

Co-authored-by: Paul Wessel <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
* Correct ex47 rows

Ex47 derived from an earlier test (regress_2.sh) which was written in classic mode.  The translation to modern mode mixed up which rows we are doing, so the initial order (bottom to top in classic) was roxy while for the modern mode going down the rows it needs to be the reverse: yxor.  It was roxy except for the L1 column which was yrox.  So bug wiwthin a bug.

* Update ex47.sh

* Update two PS files

Co-authored-by: Paul Wessel <[email protected]>
* Confidence band on regression missed multipler of sigma

The confidence band is proportional to the rms misfit (sum of squared misfits w.r.t. the regession line) divided by n-2. then sqrt.  This term was in fact missing.

* Update PS origs and set 99% confidence interval

Co-authored-by: Paul Wessel <[email protected]>
* Calculate confidence band for -Er and -Eo

The confidence bands for -Er and -Eo were either missing (-Er) or clearly suffered from typos in original manuscript (-Eo) thus giving NaNs.  This PR uses the standard propagation of error solution for -Er and the equations from G. Borradaile for the orthogonal case [both without data errors only].  The full weighted orthogonal solution may require more testing

* Update gmtregress.c

Co-authored-by: Paul Wessel <[email protected]>
* The psxy -L+d polygons were clipped incorrectly

The polygons made via +L are Cartesian in nature but got sent to a line conversion routine that looked for map jumps etc.  Now we simply convert the points to projected x,y and plot, letting the map clipping deal with that part.

* Minor changes to ex43

Co-authored-by: Paul Wessel <[email protected]>
)

We got lots of error messages like

gmt [WARNING]: Representation of font type not recognized. Using default.

from gmt end because we deleted the PSL_custom_fonts.txt before the session ended.

Co-authored-by: Paul Wessel <[email protected]>
Since no projection is needed to iin this case (presumably to set -X -Y only) then we dont need to complain if -R -J are not set.

Co-authored-by: Paul Wessel <[email protected]>
* if -R -J is given with -T then we must deal with them

The inisital PR only called map_setup if RJ was required but in fact we must call map_setup if -R -J is given.

* Update gmt_init.c

Co-authored-by: Paul Wessel <[email protected]>
We parsed the pen but forgot to set the bool flag.

Co-authored-by: Paul Wessel <[email protected]>
* Use corect -T syntax in scripts and check if argument

* Update grdview.ps

Co-authored-by: Paul Wessel <[email protected]>
The movie progress indicator option -Pf should not try to access an annotation font when no annotations are indicated.  This lead to a SEGV crash, now fixed.

Co-authored-by: Paul Wessel <[email protected]>
* THe movie indicator f uses Call_Module but must pass -X0 -Y0

Otherwise, we may pick up a previous setting which is not what we want here since the PS function will be run at the very end.

* Update gmt_plot.c

Co-authored-by: Paul Wessel <[email protected]>
* Incomplete fix of grdsample required more work

As documented on the forum, grdsample still failed to set the proper read area for input grids.  This time I hopefully paid more attention to details.  The two regions (the subset needed to be read and the desired new output region) are now carefully compared to the input grid to ensure that we inlcude all the nodes needed to do a full interpolation.  The users case passes for me, several cases I checked (including 360-regions and smaller ones with shifts of longitdues) passes plus the regular test suite.

* Update grdsample.c

Co-authored-by: Paul Wessel <[email protected]>
THe problem is that grdcontour -N calls grdview and then itself via GMT_Call_Module.  However, we have already flagged it as a oneliner but now there are several calls.  The solution was to not trigger the oneliner check for grdcontour -N and then detect it instead in the special -N branch in grdcontour.  We parse the options and discover if the command was a oneliner or not, and if it is we craft the gmt begin call needed and add the gnt end show call at the end.  Seems to work.

Co-authored-by: Paul Wessel <[email protected]>
* Fix typo introduced when new KEY was added.

* Fix another shit. It was VSC that added a closing ``)`` without me noticing it. This one caused a crash.

Co-authored-by: Joaquim <[email protected]>
* Let plotting of DCW in coast be done by plot

Because of the few polygons that have holes, we need to assemple a dataset and pass that to psxy in order for the holes to be properly handed.

* Update gmt_dcw.c

* Set upper case P so not converted twice

A lower-case p pattern is inverted so need to write out P to avoid double conversion.

* Update gmt_dcw.c

Co-authored-by: Paul Wessel <[email protected]>
The function gmtvector_fix_up_path_cartonly builds a stair-step curve from an array by adding the extra horizontal or vertical steps, thus lengthening the array.  Yet, there was no check to allocate more memory once we passed the initial GMT_INITIAL_MEM_ROW_ALLOC points.  So it took a large file to exceed that and then crash, reveling the bug.

Co-authored-by: Paul Wessel <[email protected]>
) (#3708)

Since DCW 1.2.0 is not compatible with GMT 6.1.0 or earlier, we have added a check in the latest GMT to see if a minimum gmt version string exists in DCW (it does from 1.2.0 onwareds) and if so determine if this GMT version passes the test.

Co-authored-by: Paul Wessel <[email protected]>
* Improve grdseamount docs

Cleaning up and adding figures

* fine tune

* Update grdseamount.rst

* update -M

* Update grdseamount.c

* Update grdseamount.rst

Co-authored-by: Paul Wessel <[email protected]>
The writing of the filenames etc to the list file with -M crashed because we did not pass theGMT_WITH_STRINGS when creating the dataset.  I also added time as the first column since the initial version of this went back to text output days (it was all a string record) but it makes sense to write the time as a floating point, followed by the filename and the formatted time label.

Co-authored-by: Paul Wessel <[email protected]>
#3716)

* grdseamount must write grids even if no change for a time-step

Instead of warning of no input for a time, it actually skipped writing an empty (incremental) or unchanged (cumulative) grid, which breaks workflows that makes movies or computes flexure.  Now we just warn, and clarify in man page.

* Update grdseamount.rst

Co-authored-by: Paul Wessel <[email protected]>
GMT doesn't call `gdal_info`, but calls `gdal_translate`.

Co-authored-by: Dongdong Tian <[email protected]>
Co-authored-by: Paul Wessel <[email protected]>

Co-authored-by: Paul Wessel <[email protected]>
github-actions bot and others added 26 commits August 27, 2020 18:10
* Require -R -J if -Fs gives zero height

We then need to compute the height, which requires -R -J

* Update subplot.c

Co-authored-by: Paul Wessel <[email protected]>
…4094)

For most GMT modules, if -J is not given, GMT uses -JX15c for Cartesian
data, and -JQ15c for Geographic data.

pssac can either plot seismograms as time series (Cartesian data)
or plot seismograms on maps (Geographic data). Currently, pssac always
uses -JQ15c when -J is not given.

Plotting seismograms as time series gives the following error:
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
sac [ERROR]: -S option is needed in geographic plots.
```
because GMT sets the default -JQ15c. But for geographic plots, -S
(controling the waveform time scaling) is required.

Obviously, the -JQ15c is the wrong choice. This PR fixes the issue.

In this PR, pssac always use Cartesian projection, unless -S is used.

All tests still pass. With this PR, the command
```
gmt sac seis.SAC -R9/20/-2/2 -Baf -Fr -Gp+gblack -Gn+gred -pdf single
```
plots seismograms using -JX15c, and command (with -S option)
```
gmt sac *.z -R-120/-40/35/65 -Baf -M1i -S300c -pdf map
```
plots seismograms on maps, using -JQ15c.

Co-authored-by: Dongdong Tian <[email protected]>
No longer call exit in the API.

Co-authored-by: Paul Wessel <[email protected]>
The --version and --show-datadir could be given to modules, but the price we paid was a memory leak and a call to exit.  Since the gmt driver can return those parameters, as can the API, we remove these offensive lines.

Co-authored-by: Paul Wessel <[email protected]>
Each subplot has its own command-line history, so the old script no
longer works for GMT>=6.1.0.

Co-authored-by: Dongdong Tian <[email protected]>
While this exit cannot actually happen, it is also no point having it.

Co-authored-by: Paul Wessel <[email protected]>
The grdconvert case would only exit when compiled for a specific test case

Co-authored-by: Paul Wessel <[email protected]>
Looks like this has been the default since 6.0.0.

Co-authored-by: Paul Wessel <[email protected]>
This test goes with issue #2287 which we expect to continue to work after we adjust the Mercator projection along the lines discussed in #4109.

Co-authored-by: Paul Wessel <[email protected]>
…rsets (#4112) (#4116)

* Allow composite char from different font/charsets

See #4108 for context.  This PR implements the option of having the 2nd character be surrounded by a font-switching sequence.

* Update postscriptlight.c

* Update text_notes.rst_

* Add test and update docs

* Update postscriptlight.c

Co-authored-by: Paul Wessel <[email protected]>
THe composite.sh requires ISOLatin1+ so now set.

Co-authored-by: Paul Wessel <[email protected]>
* Requires special -C +m modifier to report Mercator units relative to standard parallel

Normallly, there is no such thing as Mercator should report relative to Equator.  However, when you wish to make a Mercator map centered on a point and give spacial distances then we temporarily need to ability to measure Mercator distances from that point.

* Document -C+m

* Update gmt_proj.c

* Update gmt_proj.c

* Update merc_origin.ps

Co-authored-by: Paul Wessel <[email protected]>
* Make sure intensity subset matches tiled region if given

If an intensity grid is given, and a remote earth_relief grid is given, then when the intensity grid is read in and we specify the subregion wesn, make sure this region matches the possibly adjusted tile_wesn due to rounding in gmt_remote.c  See #4124 for background.

* Update grdimage.c

* Update grdimage.c

Actually, similar problem cased the issue to begin with.

Co-authored-by: Paul Wessel <[email protected]>
Did not show the +l modifier other than in synopsis.

Co-authored-by: Paul Wessel <[email protected]>
Update version, doi, etc
Just noticed a warning while building 6.1.1, pls one less copy/paste thing for me to do during release.

Co-authored-by: Paul Wessel <[email protected]>
@PaulWessel
Copy link
Member

Not sure what this is, a pull request from 6.1 to master of 372 file changes?

@seisman seisman closed this Dec 15, 2020
@gd-a
Copy link
Contributor Author

gd-a commented Dec 15, 2020

Sorry, it was an attempt to submit a new feature request. I'm not familiar with GitHub yet (at all).

@seisman
Copy link
Member

seisman commented Dec 15, 2020

That's OK. You can go to the "Issues" tab:
image
and click the "New issue" button:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants