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

gnuplot >=6.x no longer has '-title' argument #40

Open
Psykar opened this issue Jan 16, 2024 · 3 comments
Open

gnuplot >=6.x no longer has '-title' argument #40

Psykar opened this issue Jan 16, 2024 · 3 comments

Comments

@Psykar
Copy link

Psykar commented Jan 16, 2024

As per title.

unrecognized option -title
line 0: Cannot load input from 'Battery Graph'

Or with bash -x

+ gnuplot -persist -title 'Battery Graph'
+ echo 'zero_time_err = sqrt((A/B**2*B_err)**2+(1.0/B*A_err)**2) }'
+ echo 'full_time = (100-A)/B'
+ echo 'g(x) = x<zero_time?(x>full_time?f(x):1/0):1/0'
+ echo 'set xrange [ 758684676 : 758713476 ] noreverse'
+ echo plot '"/tmp/tmp.tk7Rtpedcl" using ($1 - 946733400):($3==2?$2:1/0) smooth unique axis x1y1 title "Plugged in" with lines linecolor rgb "blue" linewidth 3, 	"" using ($1 - 946733400):($3==1?$2:1/0) smooth unique axis x1y1 title "Discharging" with lines linecolor rgb "red" linewidth 3, 	"" using ($1 - 946733400):($3==0?$2:1/0) smooth unique axis x1y1 title "Unknown" with lines linecolor rgb "gray" linewidth 3 \'
+ true
+ echo ', g(x -(1705388544-946733400) ) title (B<0?sprintf("slope= (%.2f +/- %.2f) %/h", B*3600, B_err*3600):"") lc rgb "black" lt 2 '
unrecognized option -title
line 0: Cannot load input from 'Battery Graph'

Unfortunately I can't interpret what is needed from gnuplots changelog or I'd do an MR.

daniilkk added a commit to daniilkk/battery-stats that referenced this issue Feb 11, 2024
@daniilkk
Copy link

I don't know what is the correct portable fix but if you use qt output (like me) you can just set title like this

@choucavalier
Copy link

Got the same error on the latest git version :-/

bonswouar added a commit to bonswouar/battery-stats that referenced this issue Dec 20, 2024
bonswouar added a commit to bonswouar/battery-stats that referenced this issue Dec 22, 2024
bonswouar added a commit to bonswouar/battery-stats that referenced this issue Dec 22, 2024
bonswouar added a commit to bonswouar/battery-stats that referenced this issue Dec 22, 2024
title Qt re petterreinholdtsen#40
fix datetime: not "since 01/01/2000" anymore
fix clabel: doesn't exist anymore
@bonswouar
Copy link

bonswouar commented Dec 22, 2024

I don't know what is the correct portable fix but if you use qt output (like me) you can just set title like this

I guess the clean way would be to check if Qt is available, otherwise check for kitty/x11/etc
...Or we can just assume the user has Qt 🙄
Actually, according to my package manager, on Fedora at least libQt6 is a dependency of gnuplot

Btw I've updated my fork with some other fixes for gnuplot 6.0 (a clabel warning & local time broken), I don't know if I should do a PR though

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

No branches or pull requests

4 participants