Skip to content

Commit 53bbffb

Browse files
committed
minor no-op cleanup
f-strings make things nicer
1 parent 722c2b3 commit 53bbffb

File tree

1 file changed

+5
-7
lines changed

1 file changed

+5
-7
lines changed

gnuplotlib.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1993,15 +1993,17 @@ def set_equation(equation, cmds):
19931993
for curve in curves:
19941994
optioncmds = optioncmd(curve)
19951995

1996+
plot_pipe_name = '-'
1997+
19961998
if not self._plotCurveInASCII(curve):
19971999
# I get 2 formats: one real, and another to test the plot cmd, in case it
19982000
# fails. The test command is the same, but with a minimal point count. I
19992001
# also get the number of bytes in a single data point here
20002002
formatFull,formatMinimal = binaryFormatcmd(curve)
20012003
Ntestbytes_here = getTestDataLen(curve)
20022004

2003-
plotCurveCmds .append( "'-' " + formatFull + ' ' + optioncmds )
2004-
plotCurveCmdsMinimal.append( "'-' " + formatMinimal + ' ' + optioncmds )
2005+
plotCurveCmds .append( f"'{plot_pipe_name}' {formatFull} {optioncmds}" )
2006+
plotCurveCmdsMinimal.append( f"'{plot_pipe_name}' {formatMinimal} {optioncmds}" )
20052007

20062008
# If there was an error, these whitespace commands will simply do
20072009
# nothing. If there was no error, these are data that will be plotted in
@@ -2026,11 +2028,7 @@ def set_equation(equation, cmds):
20262028
# commands are the same (point count is not in the plot command)
20272029
matrix = ''
20282030
if curve.get('matrix'): matrix = 'matrix'
2029-
plotCurveCmds.append( \
2030-
"'-' {matrix} {using} {optioncmds}".
2031-
format(matrix = matrix,
2032-
using = using,
2033-
optioncmds = optioncmds))
2031+
plotCurveCmds.append( f"'{plot_pipe_name}' {matrix} {using} {optioncmds}" )
20342032
plotCurveCmdsMinimal.append( plotCurveCmds[-1] ) # same testing command
20352033

20362034
testData_curve = ''

0 commit comments

Comments
 (0)