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

Bug or documentation issue: -Xc and -Xf don't work in modern mode #7296

Closed
seisman opened this issue Mar 6, 2023 · 8 comments
Closed

Bug or documentation issue: -Xc and -Xf don't work in modern mode #7296

seisman opened this issue Mar 6, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@seisman
Copy link
Member

seisman commented Mar 6, 2023

Description of the problem
In the following script, I try to shift the plotting origin with different ways. -X10c, -Xa10c and -Xr10c work as expected, but -Xc10c and -Xf10c don't.

gmt begin
for mode in "" "a" "c" "f" "r"; do
	echo "Shift plotting origin with -X${mode}10c"
	gmt figure shift-X${mode}10c png
	gmt basemap -R0/10/0/10 -JX10c -Baf -B+tFrame1
	gmt basemap -R0/10/0/10 -JX10c -Baf -B+tFrame2 -X${mode}10c
	gmt basemap -R0/5/0/5 -JX5c -Baf -B+tFrame3
done
gmt end show

-X10c or -Xr10c
shift-X10c

-Xa10c
shift-Xa10c

-Xc10c
shift-Xc10c

-Xf10c
shift-Xf10c

System information

  • GMT version (gmt --version): 6.5.0_21ae9cb_2023.03.05
@seisman seisman added the bug Something isn't working label Mar 6, 2023
@PaulWessel
Copy link
Member

Just so I understand, those work OK in classic? I can see why they may not be appropriate in modern mode so perhaps the easy way out is to

  1. State in the documentation that -Xc|f are for classic only
  2. Actually disallow those settings in modern.

@joa-quim
Copy link
Member

joa-quim commented Mar 6, 2023

Agree and I would even hide c from docs. In the times of psconvert -A and walled sized papers it really makes no sense.

@seisman
Copy link
Member Author

seisman commented Mar 7, 2023

Just so I understand, those work OK in classic? I can see why they may not be appropriate in modern mode so perhaps the easy way out is to

  1. State in the documentation that -Xc|f are for classic only
  2. Actually disallow those settings in modern.

I agree that both make no sense in modern mode.

@PaulWessel
Copy link
Member

Implementing the new check on -Xc and -Xf yields 5-6 failures as those scripts used -Xc I think. Will need to run without to see if any issues,

@gd-a
Copy link
Contributor

gd-a commented Mar 7, 2023

Is it related?

#6291

@seisman
Copy link
Member Author

seisman commented Mar 8, 2023

Is it related?

#6291

I think these two issues are related.

Do you agree that -Xc and -Xf don't make sense in modern mode?

Could you please check if you still have the problem in #6291 after Paul's PR #7304 is merged into master?

@gd-a
Copy link
Contributor

gd-a commented Mar 8, 2023

Could you please check if you still have the problem

@Will do later today@.
Seems to work

@gd-a
Copy link
Contributor

gd-a commented Mar 8, 2023

Do you agree that -Xc and -Xf don't make sense in modern mode?

I don't.
Now that I switched to modern mode for most of my scripts, being flexible with positioning is a big plus ... At least, it is as long as figure, subplot and inset are not well-rounded.

See this example. Being able to position each part (especially in movie environment) can be a real hassle

@seisman seisman closed this as completed Apr 10, 2023
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