X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Flanguage%2Fstats%2Fgraph.c;fp=src%2Flanguage%2Fstats%2Fgraph.c;h=0b1c22c1226d6a4adc291f00977c1ee80508a275;hb=9d97843c4252a511175b4c8c61c85875f539e0b1;hp=7bfbbc7e1098251b3167b7b1ff24fe68dd3301dd;hpb=f593cb276e43fe2c49ee43e282cb2f7c3bcc211d;p=pspp diff --git a/src/language/stats/graph.c b/src/language/stats/graph.c index 7bfbbc7e10..0b1c22c122 100644 --- a/src/language/stats/graph.c +++ b/src/language/stats/graph.c @@ -128,14 +128,22 @@ show_scatterplot (const struct graph *cmd, const struct casereader *input) struct scatterplot_chart *scatterplot; bool byvar_overflow = false; - ds_init_cstr (&title, var_to_string (cmd->dep_vars[0])); - ds_put_cstr (&title, " vs "); - ds_put_cstr (&title, var_to_string (cmd->dep_vars[1])); + ds_init_empty (&title); + if (cmd->byvar) { - ds_put_cstr (&title, " by "); - ds_put_cstr (&title, var_to_string (cmd->byvar)); - } + ds_put_format (&title, _("%s vs. %s by %s"), + var_to_string (cmd->dep_vars[0]), + var_to_string (cmd->dep_vars[1]), + var_to_string (cmd->byvar)); + } + else + { + ds_put_format (&title, _("%s vs. %s"), + var_to_string (cmd->dep_vars[0]), + var_to_string (cmd->dep_vars[1])); + } + scatterplot = scatterplot_create(input, cmd->dep_vars[0], @@ -342,7 +350,7 @@ cmd_graph (struct lexer *lexer, struct dataset *ds) goto error; if (graph.n_dep_vars > 1) { - lex_error(lexer, _("Only one variable allowed")); + lex_error(lexer, _("Only one variable is allowed")); goto error; } }