Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inset within subplot panel fails #6415

Open
PaulWessel opened this issue Mar 6, 2022 · 4 comments
Open

Inset within subplot panel fails #6415

PaulWessel opened this issue Mar 6, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@PaulWessel
Copy link
Member

As reported on the forum, inset used in subplot panels fails in terms of placement. Clearly the -Dj setting is computing strange placement coordinates. In the original post, the BR box was plotted way to the right and later covered up by other plots.

A simple example contrasts plain inset versus inset inside a panel:

#!/bin/bash
# Shows problem with inset within subplot panel
gmt begin
    gmt figure inset_in_panel png
    gmt subplot begin 1x1 -Fs5c/4c -A
        gmt subplot set 0
        gmt coast -R70/138/13/56 -Glightgray -B
        gmt inset begin -DjTL+w0.5c/0.8c+o0.1c -F+p1p,red
        gmt inset end
    gmt subplot end

    gmt figure plain_inset png
    gmt coast -R70/138/13/56 -Glightgray -B -JQ5c
    gmt inset begin -DjTL+w0.5c/0.8c+o0.1c -F+p1p,red
    gmt inset end

gmt end show

Only showing the failing inset_in_panel plot here (the other is fine):

inset_in_panel

@PaulWessel PaulWessel added the bug Something isn't working label Mar 6, 2022
@PaulWessel PaulWessel added this to the 6.4.0 milestone Mar 6, 2022
@gd-a
Copy link
Contributor

gd-a commented Mar 8, 2022

Related to #6288 no?

@seisman
Copy link
Member

seisman commented May 14, 2022

I had the same problem today. Ping @PaulWessel just in case you forgot it.

@PaulWessel
Copy link
Member Author

Not truly forgotten, but on the road...

@seisman
Copy link
Member

seisman commented May 27, 2022

Here is another example that doens't work as expected:

gmt begin map
	gmt subplot begin 1x2 -Fs15c/15c
	gmt subplot set 0
		gmt coast -R-74/-69.5/41/43 -JM? -Baf -Wthin -Clightblue -Glightyellow
		gmt inset begin -DjBL+o0.5c/0.2c -F+pblack+gwhite+c0.2c/0.2c -R-80/-65/35/50 -JM3c
			gmt coast -Ggray -Cwhite -EUS.MA+gred -W1/thin -N1 -N2
	    gmt inset end
	gmt subplot set 1
		gmt coast -R-74/-69.5/41/43 -JM? -Baf -Wthin -Clightblue -Glightyellow
	    gmt inset begin -DjBL+o0.5c/0.2c -F+pblack+gwhite+c0.2c/0.2c -R-80/-65/35/50 -JM3c
		    gmt coast -Ggray -Cwhite -EUS.MA+gred -W1/thin -N1 -N2
	    gmt inset end
    gmt subplot end
gmt end show

image

@seisman seisman modified the milestones: 6.4.0, 6.5.0 Jun 25, 2022
@seisman seisman modified the milestones: 6.5.0, 6.6.0 Jan 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants