Debian Codegraph @

dwsys/Graphics_extensions.h

raw symbols SCIP
1 #ifndef _Graphics_extensions_h_
2 #define _Graphics_extensions_h_
3 /* Graphics_extensions.h
4 *
5 * Copyright (C) 2012-2022 David Weenink
6 *
7 * This code is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or (at
10 * your option) any later version.
11 *
12 * This code is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this work. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "Graphics.h"
22 #include "Graphics_extensions_enums.h"
23
24 /*
25 Get a font size to display at least 'maxNumberOfLines' of text that consistes of
26 'maxNumberOfCharacters_line' characters per line.
27 */
28 double Graphics_getFontSizeInsideBox (Graphics g, double widthWC, double heightWC, double maxNumberOfCharacters_line, double maxNumberOfLines);
29
30
31 /**
32 Draw a box plot of data [1..ndata]. The vertical center line of the plot
33 is at position 'x'. The rectangle box is 2*w wide, the whisker 2*r.
34 All drawing outside [ymin, ymax] is clipped.
35 */
36 void Graphics_boxAndWhiskerPlot (Graphics g, constVEC data, double x, double r, double w, double ymin, double ymax);
37
38 void Graphics_quantileQuantilePlot (Graphics g, integer numberOfQuantiles, constVEC xdata, constVEC ydata,
39 double xmin, double xmax, double ymin, double ymax, double labelSize, conststring32 plotLabel);
40
41 void Graphics_lagPlot (Graphics g, constVEC x, double xmin, double xmax, integer lag, double labelSize, conststring32 plotLabel);
42
43 void getGridLayout (integer numberOfItems, integer *out_numberOfRows, integer *out_numberOfColumns);
44 /*
45 Get dimensions of a two-dimensional grid to layout n elements as nrow x ncol,
46 where nrow x ncol >= n and nrow >= ncol and nrow - ncol <= 1.
47 */
48
49 integer getGridCellIndex (double x, double y, integer numberOfRows, integer numberOfColumns);
50 /*
51 Implicit:
52 Rectangular grid numberOfRows x numberOfColumns
53 Origin (0,0) is at left-bottom, top-right is at (1, 1)
54 */
55
56 #endif /* _Graphics_extensions_h_ */