comparison src/graphics.cc @ 6844:9ac351b05b51

[project @ 2007-08-30 00:46:23 by jwe]
author jwe
date Thu, 30 Aug 2007 00:46:23 +0000
parents 9cee629fe20c
children 11dd2cb3825c
comparison
equal deleted inserted replaced
6843:9adfed86501f 6844:9ac351b05b51
738 for (octave_idx_type i = 0; i < n; i++) 738 for (octave_idx_type i = 0; i < n; i++)
739 gh_manager::free (children(i)); 739 gh_manager::free (children(i));
740 } 740 }
741 741
742 void 742 void
743 root_figure::root_figure_properties::set (const property_name& name, 743 root_figure::properties::set (const property_name& name,
744 const octave_value& val) 744 const octave_value& val)
745 { 745 {
746 if (name.compare ("currentfigure")) 746 if (name.compare ("currentfigure"))
747 { 747 {
748 octave_value tval = empty_to_nan (val); 748 octave_value tval = empty_to_nan (val);
749 749
762 visible = val; 762 visible = val;
763 else 763 else
764 warning ("set: invalid property `%s'", name.c_str ()); 764 warning ("set: invalid property `%s'", name.c_str ());
765 } 765 }
766 766
767 octave_value root_figure::root_figure_properties::get (void) const 767 octave_value root_figure::properties::get (void) const
768 { 768 {
769 Octave_map m; 769 Octave_map m;
770 770
771 m.assign ("type", type); 771 m.assign ("type", type);
772 m.assign ("currentfigure", nan_to_empty (currentfigure)); 772 m.assign ("currentfigure", nan_to_empty (currentfigure));
775 775
776 return m; 776 return m;
777 } 777 }
778 778
779 octave_value 779 octave_value
780 root_figure::root_figure_properties::get (const property_name& name) const 780 root_figure::properties::get (const property_name& name) const
781 { 781 {
782 octave_value retval; 782 octave_value retval;
783 783
784 if (name.compare ("type")) 784 if (name.compare ("type"))
785 retval = type; 785 retval = type;
796 } 796 }
797 797
798 property_list 798 property_list
799 root_figure::factory_properties = root_figure::init_factory_properties (); 799 root_figure::factory_properties = root_figure::init_factory_properties ();
800 800
801 std::string root_figure::root_figure_properties::go_name ("root figure"); 801 std::string root_figure::properties::go_name ("root figure");
802 802
803 // --------------------------------------------------------------------- 803 // ---------------------------------------------------------------------
804 804
805 figure::figure_properties::figure_properties (const graphics_handle& mh, 805 figure::properties::properties (const graphics_handle& mh,
806 const graphics_handle& p) 806 const graphics_handle& p)
807 : base_properties (go_name, mh, p), 807 : base_properties (go_name, mh, p),
808 __plot_stream__ (Matrix ()), 808 __plot_stream__ (Matrix ()),
809 nextplot ("replace"), 809 nextplot ("replace"),
810 closerequestfcn (make_fcn_handle ("closereq")), 810 closerequestfcn (make_fcn_handle ("closereq")),
811 currentaxes (octave_NaN), 811 currentaxes (octave_NaN),
813 visible ("on"), 813 visible ("on"),
814 paperorientation ("portrait") 814 paperorientation ("portrait")
815 { } 815 { }
816 816
817 void 817 void
818 figure::figure_properties::set (const property_name& name, 818 figure::properties::set (const property_name& name,
819 const octave_value& val) 819 const octave_value& val)
820 { 820 {
821 bool modified = true; 821 bool modified = true;
822 822
823 if (name.compare ("children")) 823 if (name.compare ("children"))
824 children = maybe_set_children (children, val); 824 children = maybe_set_children (children, val);
867 if (modified) 867 if (modified)
868 mark_modified (); 868 mark_modified ();
869 } 869 }
870 870
871 octave_value 871 octave_value
872 figure::figure_properties::get (void) const 872 figure::properties::get (void) const
873 { 873 {
874 Octave_map m; 874 Octave_map m;
875 875
876 m.assign ("type", type); 876 m.assign ("type", type);
877 m.assign ("parent", parent); 877 m.assign ("parent", parent);
887 887
888 return m; 888 return m;
889 } 889 }
890 890
891 octave_value 891 octave_value
892 figure::figure_properties::get (const property_name& name) const 892 figure::properties::get (const property_name& name) const
893 { 893 {
894 octave_value retval; 894 octave_value retval;
895 895
896 if (name.compare ("type")) 896 if (name.compare ("type"))
897 retval = type; 897 retval = type;
920 920
921 return retval; 921 return retval;
922 } 922 }
923 923
924 void 924 void
925 figure::figure_properties::close (void) 925 figure::properties::close (void)
926 { 926 {
927 if (! __plot_stream__.is_empty ()) 927 if (! __plot_stream__.is_empty ())
928 { 928 {
929 octave_value_list args; 929 octave_value_list args;
930 args(1) = "\nquit;\n"; 930 args(1) = "\nquit;\n";
939 939
940 xset (0, "currentfigure", gh_manager::current_figure ()); 940 xset (0, "currentfigure", gh_manager::current_figure ());
941 } 941 }
942 942
943 property_list::pval_map_type 943 property_list::pval_map_type
944 figure::figure_properties::factory_defaults (void) 944 figure::properties::factory_defaults (void)
945 { 945 {
946 property_list::pval_map_type m; 946 property_list::pval_map_type m;
947 947
948 m["nextplot"] = "replace"; 948 m["nextplot"] = "replace";
949 // m["closerequestfcn"] = make_fcn_handle ("closereq"); 949 // m["closerequestfcn"] = make_fcn_handle ("closereq");
968 } 968 }
969 969
970 return retval; 970 return retval;
971 } 971 }
972 972
973 std::string figure::figure_properties::go_name ("figure"); 973 std::string figure::properties::go_name ("figure");
974 974
975 // --------------------------------------------------------------------- 975 // ---------------------------------------------------------------------
976 976
977 axes::axes_properties::axes_properties (const graphics_handle& mh, 977 axes::properties::properties (const graphics_handle& mh,
978 const graphics_handle& p) 978 const graphics_handle& p)
979 : base_properties (go_name, mh, p), 979 : base_properties (go_name, mh, p),
980 position (Matrix ()), 980 position (Matrix ()),
981 title (octave_NaN), 981 title (octave_NaN),
982 box ("on"), 982 box ("on"),
1045 touterposition(3) = 1; 1045 touterposition(3) = 1;
1046 outerposition = touterposition; 1046 outerposition = touterposition;
1047 } 1047 }
1048 1048
1049 void 1049 void
1050 axes::axes_properties::set (const property_name& name, const octave_value& val) 1050 axes::properties::set (const property_name& name, const octave_value& val)
1051 { 1051 {
1052 bool modified = true; 1052 bool modified = true;
1053 1053
1054 if (name.compare ("parent")) 1054 if (name.compare ("parent"))
1055 set_parent (val); 1055 set_parent (val);
1240 if (modified) 1240 if (modified)
1241 mark_modified (); 1241 mark_modified ();
1242 } 1242 }
1243 1243
1244 void 1244 void
1245 axes::axes_properties::set_defaults (base_graphics_object& obj, 1245 axes::properties::set_defaults (base_graphics_object& obj,
1246 const std::string& mode) 1246 const std::string& mode)
1247 { 1247 {
1248 position = Matrix (); 1248 position = Matrix ();
1249 title = octave_NaN; 1249 title = octave_NaN;
1250 box = "on"; 1250 box = "on";
1322 1322
1323 override_defaults (obj); 1323 override_defaults (obj);
1324 } 1324 }
1325 1325
1326 octave_value 1326 octave_value
1327 axes::axes_properties::get (void) const 1327 axes::properties::get (void) const
1328 { 1328 {
1329 Octave_map m; 1329 Octave_map m;
1330 1330
1331 if (xisnan (title)) 1331 if (xisnan (title))
1332 title = gh_manager::make_graphics_handle ("text", __myhandle__); 1332 title = gh_manager::make_graphics_handle ("text", __myhandle__);
1396 1396
1397 return m; 1397 return m;
1398 } 1398 }
1399 1399
1400 octave_value 1400 octave_value
1401 axes::axes_properties::get (const property_name& name) const 1401 axes::properties::get (const property_name& name) const
1402 { 1402 {
1403 octave_value retval; 1403 octave_value retval;
1404 1404
1405 if (name.compare ("type")) 1405 if (name.compare ("type"))
1406 retval = type; 1406 retval = type;
1533 1533
1534 return retval; 1534 return retval;
1535 } 1535 }
1536 1536
1537 void 1537 void
1538 axes::axes_properties::remove_child (const graphics_handle& h) 1538 axes::properties::remove_child (const graphics_handle& h)
1539 { 1539 {
1540 if (! xisnan (title) && h == title) 1540 if (! xisnan (title) && h == title)
1541 title = gh_manager::make_graphics_handle ("text", __myhandle__); 1541 title = gh_manager::make_graphics_handle ("text", __myhandle__);
1542 else if (! xisnan (xlabel) && h == xlabel) 1542 else if (! xisnan (xlabel) && h == xlabel)
1543 xlabel = gh_manager::make_graphics_handle ("text", __myhandle__); 1543 xlabel = gh_manager::make_graphics_handle ("text", __myhandle__);
1548 else 1548 else
1549 base_properties::remove_child (h); 1549 base_properties::remove_child (h);
1550 } 1550 }
1551 1551
1552 void 1552 void
1553 axes::axes_properties::delete_children (void) 1553 axes::properties::delete_children (void)
1554 { 1554 {
1555 base_properties::delete_children (); 1555 base_properties::delete_children ();
1556 1556
1557 if (! xisnan (title)) 1557 if (! xisnan (title))
1558 gh_manager::free (title); 1558 gh_manager::free (title);
1566 if (! xisnan (zlabel)) 1566 if (! xisnan (zlabel))
1567 gh_manager::free (zlabel); 1567 gh_manager::free (zlabel);
1568 } 1568 }
1569 1569
1570 property_list::pval_map_type 1570 property_list::pval_map_type
1571 axes::axes_properties::factory_defaults (void) 1571 axes::properties::factory_defaults (void)
1572 { 1572 {
1573 property_list::pval_map_type m; 1573 property_list::pval_map_type m;
1574 1574
1575 m["position"] = Matrix (); 1575 m["position"] = Matrix ();
1576 m["title"] = octave_NaN; 1576 m["title"] = octave_NaN;
1658 } 1658 }
1659 1659
1660 return retval; 1660 return retval;
1661 } 1661 }
1662 1662
1663 std::string axes::axes_properties::go_name ("axes"); 1663 std::string axes::properties::go_name ("axes");
1664 1664
1665 // --------------------------------------------------------------------- 1665 // ---------------------------------------------------------------------
1666 1666
1667 static Matrix 1667 static Matrix
1668 default_data (void) 1668 default_data (void)
1673 retval(1) = 1; 1673 retval(1) = 1;
1674 1674
1675 return retval; 1675 return retval;
1676 } 1676 }
1677 1677
1678 line::line_properties::line_properties (const graphics_handle& mh, 1678 line::properties::properties (const graphics_handle& mh,
1679 const graphics_handle& p) 1679 const graphics_handle& p)
1680 : base_properties (go_name, mh, p), 1680 : base_properties (go_name, mh, p),
1681 xdata (default_data ()), 1681 xdata (default_data ()),
1682 ydata (default_data ()), 1682 ydata (default_data ()),
1683 zdata (Matrix ()), 1683 zdata (Matrix ()),
1684 ldata (Matrix ()), 1684 ldata (Matrix ()),
1694 markersize (1), 1694 markersize (1),
1695 keylabel ("") 1695 keylabel ("")
1696 { } 1696 { }
1697 1697
1698 void 1698 void
1699 line::line_properties::set (const property_name& name, const octave_value& val) 1699 line::properties::set (const property_name& name, const octave_value& val)
1700 { 1700 {
1701 bool modified = true; 1701 bool modified = true;
1702 1702
1703 if (name.compare ("parent")) 1703 if (name.compare ("parent"))
1704 set_parent (val); 1704 set_parent (val);
1748 if (modified) 1748 if (modified)
1749 mark_modified (); 1749 mark_modified ();
1750 } 1750 }
1751 1751
1752 octave_value 1752 octave_value
1753 line::line_properties::get (void) const 1753 line::properties::get (void) const
1754 { 1754 {
1755 Octave_map m; 1755 Octave_map m;
1756 1756
1757 m.assign ("type", type); 1757 m.assign ("type", type);
1758 m.assign ("parent", parent); 1758 m.assign ("parent", parent);
1776 1776
1777 return m; 1777 return m;
1778 } 1778 }
1779 1779
1780 octave_value 1780 octave_value
1781 line::line_properties::get (const property_name& name) const 1781 line::properties::get (const property_name& name) const
1782 { 1782 {
1783 octave_value retval; 1783 octave_value retval;
1784 1784
1785 if (name.compare ("type")) 1785 if (name.compare ("type"))
1786 retval = type; 1786 retval = type;
1825 1825
1826 return retval; 1826 return retval;
1827 } 1827 }
1828 1828
1829 property_list::pval_map_type 1829 property_list::pval_map_type
1830 line::line_properties::factory_defaults (void) 1830 line::properties::factory_defaults (void)
1831 { 1831 {
1832 property_list::pval_map_type m; 1832 property_list::pval_map_type m;
1833 1833
1834 m["xdata"] = default_data (); 1834 m["xdata"] = default_data ();
1835 m["ydata"] = default_data (); 1835 m["ydata"] = default_data ();
1848 m["keylabel"] = ""; 1848 m["keylabel"] = "";
1849 1849
1850 return m; 1850 return m;
1851 } 1851 }
1852 1852
1853 std::string line::line_properties::go_name ("line"); 1853 std::string line::properties::go_name ("line");
1854 1854
1855 // --------------------------------------------------------------------- 1855 // ---------------------------------------------------------------------
1856 1856
1857 text::text_properties::text_properties (const graphics_handle& mh, 1857 text::properties::properties (const graphics_handle& mh,
1858 const graphics_handle& p) 1858 const graphics_handle& p)
1859 : base_properties (go_name, mh, p), 1859 : base_properties (go_name, mh, p),
1860 string (""), 1860 string (""),
1861 units ("data"), 1861 units ("data"),
1862 position (Matrix (1, 3, 0.0)), 1862 position (Matrix (1, 3, 0.0)),
1863 rotation (0), 1863 rotation (0),
1864 horizontalalignment ("left"), 1864 horizontalalignment ("left"),
1865 color (Matrix (1, 3, 1.0)) 1865 color (Matrix (1, 3, 1.0))
1866 { } 1866 { }
1867 1867
1868 void 1868 void
1869 text::text_properties::set (const property_name& name, const octave_value& val) 1869 text::properties::set (const property_name& name, const octave_value& val)
1870 { 1870 {
1871 bool modified = true; 1871 bool modified = true;
1872 1872
1873 if (name.compare ("parent")) 1873 if (name.compare ("parent"))
1874 set_parent (val); 1874 set_parent (val);
1900 if (modified) 1900 if (modified)
1901 mark_modified (); 1901 mark_modified ();
1902 } 1902 }
1903 1903
1904 octave_value 1904 octave_value
1905 text::text_properties::get (void) const 1905 text::properties::get (void) const
1906 { 1906 {
1907 Octave_map m; 1907 Octave_map m;
1908 1908
1909 m.assign ("type", type); 1909 m.assign ("type", type);
1910 m.assign ("parent", parent); 1910 m.assign ("parent", parent);
1919 1919
1920 return m; 1920 return m;
1921 } 1921 }
1922 1922
1923 octave_value 1923 octave_value
1924 text::text_properties::get (const property_name& name) const 1924 text::properties::get (const property_name& name) const
1925 { 1925 {
1926 octave_value retval; 1926 octave_value retval;
1927 1927
1928 if (name.compare ("type")) 1928 if (name.compare ("type"))
1929 retval = type; 1929 retval = type;
1950 1950
1951 return retval; 1951 return retval;
1952 } 1952 }
1953 1953
1954 property_list::pval_map_type 1954 property_list::pval_map_type
1955 text::text_properties::factory_defaults (void) 1955 text::properties::factory_defaults (void)
1956 { 1956 {
1957 property_list::pval_map_type m; 1957 property_list::pval_map_type m;
1958 1958
1959 m["string"] = ""; 1959 m["string"] = "";
1960 m["units"] = "data"; 1960 m["units"] = "data";
1964 m["color"] = Matrix (1, 3, 1.0); 1964 m["color"] = Matrix (1, 3, 1.0);
1965 1965
1966 return m; 1966 return m;
1967 } 1967 }
1968 1968
1969 std::string text::text_properties::go_name ("text"); 1969 std::string text::properties::go_name ("text");
1970 1970
1971 // --------------------------------------------------------------------- 1971 // ---------------------------------------------------------------------
1972 1972
1973 image::image_properties::image_properties (const graphics_handle& mh, 1973 image::properties::properties (const graphics_handle& mh,
1974 const graphics_handle& p) 1974 const graphics_handle& p)
1975 : base_properties (go_name, mh, p), 1975 : base_properties (go_name, mh, p),
1976 cdata (Matrix ()), 1976 cdata (Matrix ()),
1977 xdata (Matrix ()), 1977 xdata (Matrix ()),
1978 ydata (Matrix ()) 1978 ydata (Matrix ())
1979 { } 1979 { }
1980 1980
1981 void 1981 void
1982 image::image_properties::set (const property_name& name, 1982 image::properties::set (const property_name& name,
1983 const octave_value& val) 1983 const octave_value& val)
1984 { 1984 {
1985 bool modified = true; 1985 bool modified = true;
1986 1986
1987 if (name.compare ("parent")) 1987 if (name.compare ("parent"))
1988 set_parent (val); 1988 set_parent (val);
2008 if (modified) 2008 if (modified)
2009 mark_modified (); 2009 mark_modified ();
2010 } 2010 }
2011 2011
2012 octave_value 2012 octave_value
2013 image::image_properties::get (void) const 2013 image::properties::get (void) const
2014 { 2014 {
2015 Octave_map m; 2015 Octave_map m;
2016 2016
2017 m.assign ("type", type); 2017 m.assign ("type", type);
2018 m.assign ("parent", parent); 2018 m.assign ("parent", parent);
2024 2024
2025 return m; 2025 return m;
2026 } 2026 }
2027 2027
2028 octave_value 2028 octave_value
2029 image::image_properties::get (const property_name& name) const 2029 image::properties::get (const property_name& name) const
2030 { 2030 {
2031 octave_value retval; 2031 octave_value retval;
2032 2032
2033 if (name.compare ("type")) 2033 if (name.compare ("type"))
2034 retval = type; 2034 retval = type;
2049 2049
2050 return retval; 2050 return retval;
2051 } 2051 }
2052 2052
2053 property_list::pval_map_type 2053 property_list::pval_map_type
2054 image::image_properties::factory_defaults (void) 2054 image::properties::factory_defaults (void)
2055 { 2055 {
2056 property_list::pval_map_type m; 2056 property_list::pval_map_type m;
2057 2057
2058 m["cdata"] = Matrix (); 2058 m["cdata"] = Matrix ();
2059 m["xdata"] = Matrix (); 2059 m["xdata"] = Matrix ();
2060 m["ydata"] = Matrix (); 2060 m["ydata"] = Matrix ();
2061 2061
2062 return m; 2062 return m;
2063 } 2063 }
2064 2064
2065 std::string image::image_properties::go_name ("image"); 2065 std::string image::properties::go_name ("image");
2066 2066
2067 // --------------------------------------------------------------------- 2067 // ---------------------------------------------------------------------
2068 2068
2069 patch::patch_properties::patch_properties (const graphics_handle& mh, 2069 patch::properties::properties (const graphics_handle& mh,
2070 const graphics_handle& p) 2070 const graphics_handle& p)
2071 : base_properties (go_name, mh, p), 2071 : base_properties (go_name, mh, p),
2072 cdata (Matrix ()), 2072 cdata (Matrix ()),
2073 xdata (Matrix ()), 2073 xdata (Matrix ()),
2074 ydata (Matrix ()), 2074 ydata (Matrix ()),
2075 zdata (Matrix ()), 2075 zdata (Matrix ()),
2083 markerfacecolor ("none"), 2083 markerfacecolor ("none"),
2084 markersize (1) 2084 markersize (1)
2085 { } 2085 { }
2086 2086
2087 void 2087 void
2088 patch::patch_properties::set (const property_name& name, 2088 patch::properties::set (const property_name& name,
2089 const octave_value& val) 2089 const octave_value& val)
2090 { 2090 {
2091 bool modified = true; 2091 bool modified = true;
2092 2092
2093 if (name.compare ("parent")) 2093 if (name.compare ("parent"))
2094 set_parent (val); 2094 set_parent (val);
2135 if (modified) 2135 if (modified)
2136 mark_modified (); 2136 mark_modified ();
2137 } 2137 }
2138 2138
2139 octave_value 2139 octave_value
2140 patch::patch_properties::get (void) const 2140 patch::properties::get (void) const
2141 { 2141 {
2142 Octave_map m; 2142 Octave_map m;
2143 2143
2144 m.assign ("type", type); 2144 m.assign ("type", type);
2145 m.assign ("parent", parent); 2145 m.assign ("parent", parent);
2161 2161
2162 return m; 2162 return m;
2163 } 2163 }
2164 2164
2165 octave_value 2165 octave_value
2166 patch::patch_properties::get (const property_name& name) const 2166 patch::properties::get (const property_name& name) const
2167 { 2167 {
2168 octave_value retval; 2168 octave_value retval;
2169 2169
2170 if (name.compare ("type")) 2170 if (name.compare ("type"))
2171 retval = type; 2171 retval = type;
2206 2206
2207 return retval; 2207 return retval;
2208 } 2208 }
2209 2209
2210 property_list::pval_map_type 2210 property_list::pval_map_type
2211 patch::patch_properties::factory_defaults (void) 2211 patch::properties::factory_defaults (void)
2212 { 2212 {
2213 property_list::pval_map_type m; 2213 property_list::pval_map_type m;
2214 2214
2215 m["cdata"] = Matrix (); 2215 m["cdata"] = Matrix ();
2216 m["xdata"] = Matrix (); 2216 m["xdata"] = Matrix ();
2228 2228
2229 2229
2230 return m; 2230 return m;
2231 } 2231 }
2232 2232
2233 std::string patch::patch_properties::go_name ("patch"); 2233 std::string patch::properties::go_name ("patch");
2234 2234
2235 // --------------------------------------------------------------------- 2235 // ---------------------------------------------------------------------
2236 2236
2237 surface::surface_properties::surface_properties (const graphics_handle& mh, 2237 surface::properties::properties (const graphics_handle& mh,
2238 const graphics_handle& p) 2238 const graphics_handle& p)
2239 : base_properties (go_name, mh, p), 2239 : base_properties (go_name, mh, p),
2240 xdata (Matrix ()), 2240 xdata (Matrix ()),
2241 ydata (Matrix ()), 2241 ydata (Matrix ()),
2242 zdata (Matrix ()), 2242 zdata (Matrix ()),
2243 keylabel ("") 2243 keylabel ("")
2244 { } 2244 { }
2245 2245
2246 void 2246 void
2247 surface::surface_properties::set (const property_name& name, 2247 surface::properties::set (const property_name& name,
2248 const octave_value& val) 2248 const octave_value& val)
2249 { 2249 {
2250 bool modified = true; 2250 bool modified = true;
2251 2251
2252 if (name.compare ("parent")) 2252 if (name.compare ("parent"))
2253 set_parent (val); 2253 set_parent (val);
2275 if (modified) 2275 if (modified)
2276 mark_modified (); 2276 mark_modified ();
2277 } 2277 }
2278 2278
2279 octave_value 2279 octave_value
2280 surface::surface_properties::get (void) const 2280 surface::properties::get (void) const
2281 { 2281 {
2282 Octave_map m; 2282 Octave_map m;
2283 2283
2284 m.assign ("type", type); 2284 m.assign ("type", type);
2285 m.assign ("parent", parent); 2285 m.assign ("parent", parent);
2292 2292
2293 return m; 2293 return m;
2294 } 2294 }
2295 2295
2296 octave_value 2296 octave_value
2297 surface::surface_properties::get (const property_name& name) const 2297 surface::properties::get (const property_name& name) const
2298 { 2298 {
2299 octave_value retval; 2299 octave_value retval;
2300 2300
2301 if (name.compare ("type")) 2301 if (name.compare ("type"))
2302 retval = type; 2302 retval = type;
2319 2319
2320 return retval; 2320 return retval;
2321 } 2321 }
2322 2322
2323 property_list::pval_map_type 2323 property_list::pval_map_type
2324 surface::surface_properties::factory_defaults (void) 2324 surface::properties::factory_defaults (void)
2325 { 2325 {
2326 property_list::pval_map_type m; 2326 property_list::pval_map_type m;
2327 2327
2328 m["xdata"] = Matrix (); 2328 m["xdata"] = Matrix ();
2329 m["ydata"] = Matrix (); 2329 m["ydata"] = Matrix ();
2331 m["keylabel"] = ""; 2331 m["keylabel"] = "";
2332 2332
2333 return m; 2333 return m;
2334 } 2334 }
2335 2335
2336 std::string surface::surface_properties::go_name ("surface"); 2336 std::string surface::properties::go_name ("surface");
2337 2337
2338 // --------------------------------------------------------------------- 2338 // ---------------------------------------------------------------------
2339 2339
2340 octave_value 2340 octave_value
2341 base_graphics_object::get_default (const property_name& name) const 2341 base_graphics_object::get_default (const property_name& name) const
2427 property_list::plist_map_type 2427 property_list::plist_map_type
2428 root_figure::init_factory_properties (void) 2428 root_figure::init_factory_properties (void)
2429 { 2429 {
2430 property_list::plist_map_type plist_map; 2430 property_list::plist_map_type plist_map;
2431 2431
2432 plist_map["figure"] = figure::figure_properties::factory_defaults (); 2432 plist_map["figure"] = figure::properties::factory_defaults ();
2433 plist_map["axes"] = axes::axes_properties::factory_defaults (); 2433 plist_map["axes"] = axes::properties::factory_defaults ();
2434 plist_map["line"] = line::line_properties::factory_defaults (); 2434 plist_map["line"] = line::properties::factory_defaults ();
2435 plist_map["text"] = text::text_properties::factory_defaults (); 2435 plist_map["text"] = text::properties::factory_defaults ();
2436 plist_map["image"] = image::image_properties::factory_defaults (); 2436 plist_map["image"] = image::properties::factory_defaults ();
2437 plist_map["patch"] = patch::patch_properties::factory_defaults (); 2437 plist_map["patch"] = patch::properties::factory_defaults ();
2438 plist_map["surface"] = surface::surface_properties::factory_defaults (); 2438 plist_map["surface"] = surface::properties::factory_defaults ();
2439 2439
2440 return plist_map; 2440 return plist_map;
2441 } 2441 }
2442 2442
2443 // --------------------------------------------------------------------- 2443 // ---------------------------------------------------------------------
2896 { 2896 {
2897 graphics_object obj = gh_manager::get_object (h); 2897 graphics_object obj = gh_manager::get_object (h);
2898 2898
2899 if (obj.isa ("line")) 2899 if (obj.isa ("line"))
2900 { 2900 {
2901 line::line_properties& lp 2901 line::properties& lp
2902 = dynamic_cast<line::line_properties&> (obj.get_properties ()); 2902 = dynamic_cast<line::properties&> (obj.get_properties ());
2903 retval = lp.get_xdata (); 2903 retval = lp.get_xdata ();
2904 Matrix m (1, 5); 2904 Matrix m (1, 5);
2905 m(0) = 0; 2905 m(0) = 0;
2906 m(1) = 1; 2906 m(1) = 1;
2907 m(2) = 2; 2907 m(2) = 2;