Skip to content

Let one-liners with CPTs add colorbar#6427

Merged
PaulWessel merged 2 commits intomasterfrom
one-liner-improvement
Mar 10, 2022
Merged

Let one-liners with CPTs add colorbar#6427
PaulWessel merged 2 commits intomasterfrom
one-liner-improvement

Conversation

@PaulWessel
Copy link
Member

Without the colorbar, a colored image has little meaning if we cannot tell what values they represent.
This PR checks if the plotting module involves a CPT, and if so we place it on top via a colorbar -DJTC -Baf call.

Example: gmt grdimage @earth_relief_02m -RFR -B -png map

map

Closes #6426.

Without the colorbar, a colored image has little meaning if we cannot tell what values they represent.
@PaulWessel PaulWessel added the enhancement Improving an existing feature label Mar 10, 2022
@PaulWessel PaulWessel added this to the 6.4.0 milestone Mar 10, 2022
@PaulWessel PaulWessel self-assigned this Mar 10, 2022
@PaulWessel PaulWessel merged commit 27bddce into master Mar 10, 2022
@PaulWessel PaulWessel deleted the one-liner-improvement branch March 10, 2022 12:06
@Esteban82
Copy link
Member

Just a question @PaulWessel.

Why do you decided to put the colorbar on top of the figure (-DJTC -Baf)?

In #6426 you suggest to use gmt colorbar -DJBC -B which is the default position for gmt colorbar.

@PaulWessel
Copy link
Member Author

I think because the default -B is -BWsne, but I am open to discussion.

@Esteban82
Copy link
Member

Ok. The issue is that if I run something like this I get a colorbar below. So, I think we should use the same default position of gmt colorbar.

gmt begin ...
	gmt grdimage $grd ...
	gmt colorbar 
gmt end

@maxrjones maxrjones added the add-changelog Add PR to the changelog label Mar 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

add-changelog Add PR to the changelog enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Let one-liners involving a CPT display colorbar

4 participants