Example #1
0
func (h *IupPPlot) InsertStrPoints(index, sample_index int, x []string, y []float32) {
	count := len(x)
	if len(x) > len(y) {
		count = len(y)
	}
	cx := iup.NewCSA(x)
	defer iup.FreeCSA(cx)
	C.IupPPlotInsertStrPoints(toNative(h), C.int(index), C.int(sample_index), (**C.char)(unsafe.Pointer(&cx[0])), (*C.float)(unsafe.Pointer(&y[0])), C.int(count))
}
Example #2
0
File: pplot.go Project: DaviWei/iup
// Differs from InsertPoints as `count' is determined automatically in this case
func InsertStringPoints(ih *iup.Ihandle, index, sample_index int, x []string, y []float64) {
	count := len(x)

	cX := stringArrayToC(x)
	defer freeCStringArray(cX)

	cY := float64ArrayToC(y)

	C.IupPPlotInsertStrPoints(ih.C(), C.int(index), C.int(sample_index), &cX[0], &cY[0], C.int(count))
}