source: branches/casa-release-4_3/src/python_Plotter2.cpp@ 3111

Last change on this file since 3111 was 2909, checked in by WataruKawasaki, 11 years ago

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed:

Test Programs:

Put in Release Notes:

Module(s): sd

Description: (1) a bug fix in sd.scantable.parse_spw_selection(). modified to get rest frequency value correctly based on molecule ID stored for each spw (the first spectrum having the specified spw in scantable). (2) renamed 'annotation' to 'text' in class or variable names for sd.plotter2.


File size: 4.2 KB
Line 
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
35using namespace boost::python;
36
37namespace asap {
38 namespace python {
39 void python_Plotter2() {
40 class_<Plotter2>("Plotter2")
41 .def( init <> () )
42 .def("get_filename",&Plotter2::getFileName)
43 .def("set_filename",&Plotter2::setFileName)
44 .def("get_device",&Plotter2::getDevice)
45 .def("set_device",&Plotter2::setDevice)
46 .def("get_viewsurface_width",&Plotter2::getViewSurfaceWidth)
47 .def("get_viewsurface_aspect",&Plotter2::getViewSurfaceAspect)
48 .def("set_viewsurface",&Plotter2::setViewSurface)
49 .def("add_viewport",&Plotter2::addViewport)
50 .def("set_viewport",&Plotter2::setViewport)
51 .def("show_viewport",&Plotter2::showViewport)
52 .def("hide_viewport",&Plotter2::hideViewport)
53 .def("get_hasdefaultvp",&Plotter2::getHasDefaultViewport)
54 .def("get_currentvpid",&Plotter2::getCurrentViewportId)
55 .def("get_vinfo",&Plotter2::getViewInfo)
56
57 .def("set_range",&Plotter2::setRange)
58 .def("set_range_x",&Plotter2::setRangeX)
59 .def("set_range_y",&Plotter2::setRangeY)
60 .def("get_range_x",&Plotter2::getRangeX)
61 .def("get_range_y",&Plotter2::getRangeY)
62 .def("set_autorange",&Plotter2::setAutoRange)
63 .def("set_autorange_x",&Plotter2::setAutoRangeX)
64 .def("set_autorange_y",&Plotter2::setAutoRangeY)
65 .def("set_fontsize",&Plotter2::setFontSizeDef)
66 .def("set_tics_x",&Plotter2::setTicksX)
67 .def("set_tics_y",&Plotter2::setTicksY)
68 .def("set_autotics",&Plotter2::setAutoTicks)
69 .def("set_autotics_x",&Plotter2::setAutoTicksX)
70 .def("set_autotics_y",&Plotter2::setAutoTicksY)
71 .def("set_ninterval_x",&Plotter2::setNumIntervalX)
72 .def("set_ninterval_y",&Plotter2::setNumIntervalY)
73 .def("set_nlocation_x",&Plotter2::setNumLocationX)
74 .def("set_nlocation_y",&Plotter2::setNumLocationY)
75 .def("set_data",&Plotter2::setData)
76 .def("set_line",&Plotter2::setLine)
77 .def("show_line",&Plotter2::showLine)
78 .def("hide_line",&Plotter2::hideLine)
79 .def("set_point",&Plotter2::setPoint)
80 .def("show_point",&Plotter2::showPoint)
81 .def("hide_point",&Plotter2::hidePoint)
82 .def("set_mask_x",&Plotter2::setMaskX)
83 .def("set_arrow",&Plotter2::setArrow)
84 .def("set_text",&Plotter2::setText)
85 .def("set_label_x",&Plotter2::setLabelX)
86 .def("set_label_y",&Plotter2::setLabelY)
87 .def("set_title",&Plotter2::setTitle)
88 .def("set_vpbgcolor",&Plotter2::setViewportBackgroundColor)
89
90 .def("plot",&Plotter2::plot)
91 ;
92 };
93 } // namespace python
94} // namespace asap
Note: See TracBrowser for help on using the repository browser.