[2825] | 1 | //#---------------------------------------------------------------------------
|
---|
| 2 | //# python_Plotter2.cc: python exposure of C++ Plotter2 class
|
---|
| 3 | //#---------------------------------------------------------------------------
|
---|
| 4 | //# Copyright (C) 2012
|
---|
| 5 | //# ATNF
|
---|
| 6 | //#
|
---|
| 7 | //# This program is free software; you can redistribute it and/or modify it
|
---|
| 8 | //# under the terms of the GNU General Public License as published by the Free
|
---|
| 9 | //# Software Foundation; either version 2 of the License, or (at your option)
|
---|
| 10 | //# any later version.
|
---|
| 11 | //#
|
---|
| 12 | //# This program 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 General
|
---|
| 15 | //# Public License for more details.
|
---|
| 16 | //#
|
---|
| 17 | //# You should have received a copy of the GNU General Public License along
|
---|
| 18 | //# with this program; if not, write to the Free Software Foundation, Inc.,
|
---|
| 19 | //# 675 Massachusetts Ave, Cambridge, MA 02139, USA.
|
---|
| 20 | //#
|
---|
| 21 | //# Correspondence concerning this software should be addressed as follows:
|
---|
| 22 | //# Internet email: Malte.Marquarding@csiro.au
|
---|
| 23 | //# Postal address: Malte Marquarding,
|
---|
| 24 | //# Australia Telescope National Facility,
|
---|
| 25 | //# P.O. Box 76,
|
---|
| 26 | //# Epping, NSW, 2121,
|
---|
| 27 | //# AUSTRALIA
|
---|
| 28 | //#
|
---|
| 29 | //# $Id: python_Plotter2.cpp 2012 2012-03-12 05:51:50Z WataruKawasaki $
|
---|
| 30 | //#---------------------------------------------------------------------------
|
---|
| 31 | #include <boost/python.hpp>
|
---|
| 32 |
|
---|
| 33 | #include "Plotter2.h"
|
---|
| 34 |
|
---|
| 35 | using namespace boost::python;
|
---|
| 36 |
|
---|
| 37 | namespace asap {
|
---|
| 38 | namespace python {
|
---|
| 39 | void python_Plotter2() {
|
---|
| 40 | class_<Plotter2>("Plotter2")
|
---|
| 41 | .def( init <> () )
|
---|
[2827] | 42 | .def("get_filename",&Plotter2::getFileName)
|
---|
[2825] | 43 | .def("set_filename",&Plotter2::setFileName)
|
---|
[2827] | 44 | .def("get_device",&Plotter2::getDevice)
|
---|
[2825] | 45 | .def("set_device",&Plotter2::setDevice)
|
---|
| 46 | .def("add_viewport",&Plotter2::addViewport)
|
---|
| 47 | .def("set_viewport",&Plotter2::setViewport)
|
---|
| 48 | .def("show_viewport",&Plotter2::showViewport)
|
---|
| 49 | .def("hide_viewport",&Plotter2::hideViewport)
|
---|
| 50 | .def("get_hasdefaultvp",&Plotter2::getHasDefaultViewport)
|
---|
| 51 | .def("get_currentvpid",&Plotter2::getCurrentViewportId)
|
---|
| 52 | .def("get_vinfo",&Plotter2::getViewInfo)
|
---|
| 53 |
|
---|
| 54 | .def("set_range",&Plotter2::setRange)
|
---|
| 55 | .def("set_range_x",&Plotter2::setRangeX)
|
---|
| 56 | .def("set_range_y",&Plotter2::setRangeY)
|
---|
| 57 | .def("get_range_x",&Plotter2::getRangeX)
|
---|
| 58 | .def("get_range_y",&Plotter2::getRangeY)
|
---|
| 59 | .def("set_autorange",&Plotter2::setAutoRange)
|
---|
| 60 | .def("set_autorange_x",&Plotter2::setAutoRangeX)
|
---|
| 61 | .def("set_autorange_y",&Plotter2::setAutoRangeY)
|
---|
| 62 | .def("set_fontsize",&Plotter2::setFontSizeDef)
|
---|
| 63 | .def("set_tics_x",&Plotter2::setTicksX)
|
---|
| 64 | .def("set_tics_y",&Plotter2::setTicksY)
|
---|
| 65 | .def("set_autotics",&Plotter2::setAutoTicks)
|
---|
| 66 | .def("set_autotics_x",&Plotter2::setAutoTicksX)
|
---|
| 67 | .def("set_autotics_y",&Plotter2::setAutoTicksY)
|
---|
| 68 | .def("set_ninterval_x",&Plotter2::setNumIntervalX)
|
---|
| 69 | .def("set_ninterval_y",&Plotter2::setNumIntervalY)
|
---|
| 70 | .def("set_nlocation_x",&Plotter2::setNumLocationX)
|
---|
| 71 | .def("set_nlocation_y",&Plotter2::setNumLocationY)
|
---|
| 72 | .def("set_data",&Plotter2::setData)
|
---|
| 73 | .def("set_line",&Plotter2::setLine)
|
---|
| 74 | .def("show_line",&Plotter2::showLine)
|
---|
| 75 | .def("hide_line",&Plotter2::hideLine)
|
---|
| 76 | .def("set_point",&Plotter2::setPoint)
|
---|
| 77 | .def("show_point",&Plotter2::showPoint)
|
---|
| 78 | .def("hide_point",&Plotter2::hidePoint)
|
---|
| 79 | .def("set_mask_x",&Plotter2::setMaskX)
|
---|
| 80 | .def("set_label_x",&Plotter2::setLabelX)
|
---|
| 81 | .def("set_label_y",&Plotter2::setLabelY)
|
---|
| 82 | .def("set_title",&Plotter2::setTitle)
|
---|
| 83 | .def("set_vpbgcolor",&Plotter2::setViewportBackgroundColor)
|
---|
| 84 | //.def("set_annotation",&Plotter2::setAnnotation)
|
---|
| 85 |
|
---|
| 86 | .def("plot",&Plotter2::plot)
|
---|
| 87 | ;
|
---|
| 88 | };
|
---|
| 89 | } // namespace python
|
---|
| 90 | } // namespace asap
|
---|