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

Warning messagge with text via gmt events -Et #8328

Open
Esteban82 opened this issue Jan 25, 2024 · 5 comments
Open

Warning messagge with text via gmt events -Et #8328

Esteban82 opened this issue Jan 25, 2024 · 5 comments
Labels
bug Something isn't working

Comments

@Esteban82
Copy link
Member

I am getting these warning messagges when I do an animation with text (via gmt events).

text [WARNING]: Record 1 had bad fill transparency (NaN) - set to 0.0
text [WARNING]: Record 1 had bad stroke transparency (NaN) - set to 0.0

The messagges only appears related to the frame 16. I think that is when the text appears in the animation. In the other frames, the messagge don't appear (add -Fpng to see it). I can't see anything wrong in the frame but I'm not sure.

Full messagge:

movie [INFORMATION]: Paper dimensions: Width = 24c Height = 13.5c
movie [INFORMATION]: Pixel dimensions: 320 x 180
movie [INFORMATION]: Building opaque PNG images.
movie [INFORMATION]: Create parameter initiation script movie_init.sh
movie [INFORMATION]: Create preflight script movie_preflight.sh and execute it
movie [INFORMATION]: Reading Data Table from File distance_vs_frame.txt
movie [INFORMATION]: Number of main animation frames: 20
movie [INFORMATION]: Parameter files for main animation: 20
movie [INFORMATION]: Create master frame script movie_master.sh
text [WARNING]: Record 2 had bad fill transparency (NaN) - set to 0.0
text [WARNING]: Record 2 had bad stroke transparency (NaN) - set to 0.0
movie [INFORMATION]: Single master plot (frame 16) built: WED-A_Fig_8_test.png

Full script

cat << 'EOF' > in.sh
	cat <<- 'FILE' > cities.txt
	-74.007	40.712	New York
	-52.712	47.562	St. John's
	FILE
EOF
cat << 'EOF' > pre.sh
gmt begin
    gmt sample1d cities.txt -T100k+a > distance_vs_frame.txt
    gmt mapproject cities.txt -G+uk > labels.txt
gmt end
EOF
cat << 'EOF' > main.sh
gmt begin
	gmt coast -JM${MOVIE_COL0}/${MOVIE_COL1}/${MOVIE_WIDTH} -Y0 -X0 -R480/270+uk -G200 -Sdodgerblue2 -N1/0.2,- 
    gmt events labels.txt -T${MOVIE_COL2} -F+f18p+jTC -Et+r100+f100+o-250  # -Ve
gmt end
EOF
gmt movie main.sh -Iin.sh -Sbpre.sh -Ntest -Tdistance_vs_frame.txt -C240p -V -D3 -Lf -M16,png  #-Fpng

Another issue

If I add -Ve in gmt events, the warning messagges dissapear but I get events [ERROR]: Unrecognized option -V

Full messagge:

movie [INFORMATION]: Paper dimensions: Width = 24c Height = 13.5c
movie [INFORMATION]: Pixel dimensions: 320 x 180
movie [INFORMATION]: Building opaque PNG images.
movie [INFORMATION]: Create parameter initiation script movie_init.sh
movie [INFORMATION]: Create preflight script movie_preflight.sh and execute it
movie [INFORMATION]: Reading Data Table from File distance_vs_frame.txt
movie [INFORMATION]: Number of main animation frames: 20
movie [INFORMATION]: Parameter files for main animation: 20
movie [INFORMATION]: Create master frame script movie_master.sh
events [ERROR]: Unrecognized option -V
movie [INFORMATION]: Single master plot (frame 16) built: WED-A_Fig_8_test.png
@Esteban82 Esteban82 added the bug Something isn't working label Jan 25, 2024
@PaulWessel
Copy link
Member

How are you passing in stroke and fill transparency for the text? With extra columns and -t[+f][+s] ?

prevents.c has -V. How can that fail to parse? I guess I need to debug. Very very odd.

@PaulWessel
Copy link
Member

Oh, you pass # -Ve so perhaps it reads the # as a file and then get -Ve?

@Esteban82
Copy link
Member Author

Oh, you pass # -Ve so perhaps it reads the # as a file and then get -Ve?

I put that for the second issue. If I remove that, I got the same output.

@Esteban82
Copy link
Member Author

How are you passing in stroke and fill transparency for the text? With extra columns and -t[+f][+s] ?

I think I don't. Is that needed? If so, why the messagges didn't appear for the rest of the frames?

@PaulWessel
Copy link
Member

The -Ve errors: Clearly events supports -V but I think what happens is that events passes -V down to modules it calls so it becomes too many -V and clearly that check is not working well as it says -V is not "recognised" when it probably means it is already set. Will have to debug during the daytime with plenty of coffee inside.

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

2 participants