Lines Matching refs:plot
52 ploticus_new_plot_hist(struct ploticus_plot *plot) in ploticus_new_plot_hist() argument
54 prop_dictionary_t params = plot->params; in ploticus_new_plot_hist()
74 ploticus_new_plot_line(struct ploticus_plot *plot) in ploticus_new_plot_line() argument
76 prop_dictionary_t params = plot->params; in ploticus_new_plot_line()
103 struct ploticus_plot *plot; in ploticus_new_plot() local
119 if (!(plot = calloc(1, sizeof(*plot)))) in ploticus_new_plot()
121 plot->params = params; in ploticus_new_plot()
122 plot->type = type; in ploticus_new_plot()
124 if (asprintf(&plot->path, "%s-%d-%s", ctx->basepath, type, in ploticus_new_plot()
127 if (asprintf(&datapath, "%s.data", plot->path) < 0) in ploticus_new_plot()
143 if (plot_type_initializers[type](plot)) in ploticus_new_plot()
145 if (!(plot->fp = fopen(datapath, "w"))) { in ploticus_new_plot()
149 ctx->plots[ctx->nr_plots] = plot; in ploticus_new_plot()
155 free(plot->path); in ploticus_new_plot()
157 free(plot); in ploticus_new_plot()
168 struct ploticus_plot *plot; in ploticus_plot_histogram() local
172 plot = ctx->plots[id]; in ploticus_plot_histogram()
173 assert(plot != NULL); in ploticus_plot_histogram()
175 fprintf(plot->fp, "%lf\n", val); in ploticus_plot_histogram()
185 struct ploticus_plot *plot; in ploticus_plot_line() local
189 plot = ctx->plots[id]; in ploticus_plot_line()
190 assert(plot != NULL); in ploticus_plot_line()
192 fprintf(plot->fp, "%lf %lf\n", x, y); in ploticus_plot_line()
201 ploticus_run(struct ploticus_plot *plot) in ploticus_run() argument
212 nr_params = prop_dictionary_count(plot->params); in ploticus_run()
223 if (!(it = prop_dictionary_iterator(plot->params))) in ploticus_run()
227 pl_argv[2] = plot_prefabs[plot->type]; in ploticus_run()
231 "%s.svg", plot->path) < 0) in ploticus_run()
237 val = prop_dictionary_get_keysym(plot->params, key); in ploticus_run()
255 ploticus_plot_generate(struct ploticus_plot *plot) in ploticus_plot_generate() argument
260 fclose(plot->fp); in ploticus_plot_generate()
266 ploticus_run(plot); in ploticus_plot_generate()