{"id":1042,"date":"2014-10-14T09:55:14","date_gmt":"2014-10-14T14:55:14","guid":{"rendered":"https:\/\/blogs.mathworks.com\/loren\/?p=1042"},"modified":"2016-08-04T09:12:35","modified_gmt":"2016-08-04T14:12:35","slug":"matlab-r2014b-graphics-part-2-using-graphics-objects","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/loren\/2014\/10\/14\/matlab-r2014b-graphics-part-2-using-graphics-objects\/","title":{"rendered":"MATLAB R2014b Graphics &#8211; Part 2: Using Graphics Objects"},"content":{"rendered":"<div class=\"content\"><!--introduction--><\/p>\n<p>Today, <a href=\"mailto:david.garrison@mathworks.com\">David Garrison<\/a>, our guest blogger, will continue his series on the new graphics system in R2014b.<\/p>\n<div>\n<ul>\n<li>Part 1: Features of the New Graphics System<\/li>\n<li><b>Part 2: Using Graphics Objects<\/b><\/li>\n<li>Part 3: Compatibility Considerations in the New Graphics System<\/li>\n<\/ul>\n<\/div>\n<p>Here is Part 2 of the series.<\/p>\n<p><!--\/introduction--><\/p>\n<h3>Contents<\/h3>\n<div>\n<ul>\n<li><a href=\"#f19cb262-a2a2-48d5-8410-d006b708a713\">What have we learned so far?<\/a><\/li>\n<li><a href=\"#c3329ae6-e2bf-4740-a09d-aae9a3d990e0\">The MATLAB Graphics System<\/a><\/li>\n<li><a href=\"#ab3dc4b1-326b-4c56-b757-7d126aaf3aaa\">Pre-R2014b Numeric Handles<\/a><\/li>\n<li><a href=\"#c726b9e0-9e9f-4e09-9c5a-75b45bed8f0f\">R2014b Graphics Objects<\/a><\/li>\n<li><a href=\"#fd562af3-d1e3-4c7c-8c35-4f46229fd693\">Getting and Setting Object Properties<\/a><\/li>\n<li><a href=\"#066ca5a3-0bb7-4312-bcd3-b26f9297ef42\">Using <tt>set<\/tt> and <tt>get<\/tt><\/a><\/li>\n<li><a href=\"#ddb8ee09-d15d-422e-b7e7-fcf8a659388a\">Have you starting using graphics objects in R2014b?<\/a><\/li>\n<li><a href=\"#fc348d8e-39d3-4566-bb85-98ee47abfef7\">Next up -- Part 3: Compatibility Considerations in the New Graphics System<\/a><\/li>\n<\/ul>\n<\/div>\n<h4>What have we learned so far?<a name=\"f19cb262-a2a2-48d5-8410-d006b708a713\"><\/a><\/h4>\n<p>In <a href=\"https:\/\/blogs.mathworks.com\/loren\/2014\/10\/03\/matlab-r2014b-graphics-part-1-features-of-the-new-graphics-system\/\">Part 1<\/a> of this series, I provided an introduction to the new MATLAB graphics system in R2014b.  I described a number of new features and alluded to one of the big changes in R2014b -- <i>graphics functions return MATLAB objects, not numeric handles<\/i>.<\/p>\n<h4>The MATLAB Graphics System<a name=\"c3329ae6-e2bf-4740-a09d-aae9a3d990e0\"><\/a><\/h4>\n<p>When I use MATLAB, I usually don't think about the internal graphics system.  Usually, I'm just trying to visualize some data.  I might call one of the MATLAB charting functions, like <tt>plot<\/tt> or <tt>bar<\/tt> to understand something important about my data.  I also create user interfaces using functions like <tt>uicontrol<\/tt> or <tt>uipanel<\/tt>.  These are functions that are part of the MATLAB graphics system.<\/p>\n<p>Let's suppose that I am creating a plot and I want the line in the plot to be red. I can do that in one of two ways. I can call the <tt>plot<\/tt> function with some extra arguments like this.<\/p>\n<pre class=\"codeinput\">x = 0:0.1:10;\r\ny = sin(x);\r\nplot(x,y,<span class=\"string\">'Color'<\/span>,<span class=\"string\">'red'<\/span>)\r\n<\/pre>\n<p>I can also use the output argument of the <tt>plot<\/tt> command to modify my plot after I've created it.  Here I created the plot first, then used the <tt>set<\/tt> command to change the color of the line.<\/p>\n<pre class=\"codeinput\">p = plot(x,y) ;\r\nset(p, <span class=\"string\">'Color'<\/span>, <span class=\"string\">'red'<\/span>)\r\n<\/pre>\n<h4>Pre-R2014b Numeric Handles<a name=\"ab3dc4b1-326b-4c56-b757-7d126aaf3aaa\"><\/a><\/h4>\n<p>Prior to R2014b, a call to a graphics function would return a number like this<\/p>\n<pre class=\"language-matlab\">p = plot(x,y)\r\n<\/pre>\n<pre class=\"codeoutput\">\r\np =\r\n\r\n    174.346<\/pre>\n<p>The value of the variable <tt>p<\/tt> was a special kind of number called a <i>handle<\/i>.  The handle was a reference to a graphics object. The object itself was not available to the user but you could use the handle to retrieve or change properties of the object using the <tt>set<\/tt> and <tt>get<\/tt> commands.  In the example above, we used the handle of the line object to set its color.  In fact, when this capability first became available in MATLAB, this approach was so new and useful it was given a special name -- <i>Handle Graphics<\/i>.<\/p>\n<p>All graphics handles were just numeric values.  Those values were integers for figures and fractional values for everything else.  You could use a handle anywhere you could use a number.  I've seen MATLAB code where people stored their handles with other data in a double array or used handles in functions where a number is expected as the argument (e.g. math functions).<\/p>\n<p>As you probably know, graphics objects are stored as a tree structure with parents and children.  There is a special object at the top of the tree called the <i>graphics root<\/i>.  Prior to R2014b, the handle to the graphics root was always <tt>0<\/tt>.  For example to get the list of all open figures, you could type:<\/p>\n<pre class=\"codeinput\">myFigures = get(0, <span class=\"string\">'Children'<\/span>);\r\n<\/pre>\n<h4>R2014b Graphics Objects<a name=\"c726b9e0-9e9f-4e09-9c5a-75b45bed8f0f\"><\/a><\/h4>\n<p>In R2014b, graphics functions do not return numeric handles any more. They now return MATLAB objects.  Now when you call a graphics function with an output argument, you see something like this:<\/p>\n<pre class=\"codeinput\">p = plot(x,y)\r\n<\/pre>\n<pre class=\"codeoutput\">\r\np = \r\n\r\n  Line with properties:\r\n\r\n              Color: [0 0.4470 0.7410]\r\n          LineStyle: '-'\r\n          LineWidth: 0.5000\r\n             Marker: 'none'\r\n         MarkerSize: 6\r\n    MarkerFaceColor: 'none'\r\n              XData: [1x101 double]\r\n              YData: [1x101 double]\r\n              ZData: [1x0 double]\r\n\r\n  Use GET to show all properties\r\n\r\n<\/pre>\n<p>The <tt>plot<\/tt> function now returns a <tt>Line<\/tt> object.  That line object has properties.  When MATLAB displays the line object in the command window, it shows the object's most common properties.  The <tt>all properties<\/tt> text is a hyperlink that you can click to see all the properties of the object.<\/p>\n<p>If you use the <tt>whos<\/tt> function to see more information about <tt>p<\/tt>, you see something like this:<\/p>\n<pre class=\"codeinput\">whos <span class=\"string\">p<\/span>\r\n<\/pre>\n<pre class=\"codeoutput\">  Name      Size            Bytes  Class                                   Attributes\r\n\r\n  p         1x1               112  matlab.graphics.chart.primitive.Line              \r\n\r\n<\/pre>\n<p>The <i>Class<\/i> column in the <tt>whos<\/tt> output indicates what kind of object if is.  What you see here is the full class name of the object.  Don't worry too much about the details of the class name.  Most of you will never need to use it.<\/p>\n<p>In R2014b, use the <tt>groot<\/tt> function to refer to the graphics root.<\/p>\n<pre class=\"codeinput\">groot\r\n<\/pre>\n<pre class=\"codeoutput\">\r\nans = \r\n\r\n  Graphics Root with properties:\r\n\r\n          CurrentFigure: [1x1 Figure]\r\n    ScreenPixelsPerInch: 96\r\n             ScreenSize: [1 1 1920 1200]\r\n       MonitorPositions: [1 1 1920 1200]\r\n                  Units: 'pixels'\r\n\r\n  Use GET to show all properties\r\n\r\n<\/pre>\n<h4>Getting and Setting Object Properties<a name=\"fd562af3-d1e3-4c7c-8c35-4f46229fd693\"><\/a><\/h4>\n<p>One of the benefits of having graphic objects is that you can now get and set their values using dot notation.  Dot notation has the form <tt>object.Property<\/tt>.  It is the same syntax that you use when you want to refer to the field of a structure.  For example, in R2014b, you can get the color of the line above like this:<\/p>\n<pre class=\"codeinput\">p.Color\r\n<\/pre>\n<pre class=\"codeoutput\">\r\nans =\r\n\r\n         0    0.4470    0.7410\r\n\r\n<\/pre>\n<p>Similarly, you can set the line width of the line using dot notation.<\/p>\n<pre class=\"codeinput\">p.LineWidth = 2;\r\n<\/pre>\n<p>Dot notation is also useful if you want to set properties of two objects to be the same.  Prior to R2014b, you might write code that looks like this:<\/p>\n<pre class=\"language-matlab\">set(p2, <span class=\"string\">'Color'<\/span>, get(p1, <span class=\"string\">'Color'<\/span>))\r\n<\/pre>\n<p>With dot notation, you can do the same thing with<\/p>\n<pre class=\"language-matlab\">p2.Color = p1.Color;\r\n<\/pre>\n<p>With dot notation you can also use tab completion when you are trying to access a graphics object property.<\/p>\n<p><img decoding=\"async\" vspace=\"5\" hspace=\"5\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/2014\/tab_completion.png\" alt=\"\"> <\/p>\n<p>You can still use the <tt>set<\/tt> and <tt>get<\/tt> functions but I find dot notation a much more convenient way to refer to object properties. One note of caution, however.  When you use dot notation you must use the correct capitalization of the property name.  For example,<\/p>\n<pre class=\"language-matlab\">p.LineWidth\r\n<\/pre>\n<p>will return the value of the line width but<\/p>\n<pre class=\"language-matlab\">p.linewidth\r\n<\/pre>\n<p>will cause an error.<\/p>\n<h4>Using <tt>set<\/tt> and <tt>get<\/tt><a name=\"066ca5a3-0bb7-4312-bcd3-b26f9297ef42\"><\/a><\/h4>\n<p>As I mentioned above, you can still use the <tt>set<\/tt> and <tt>get<\/tt> functions and there are cases where <tt>set<\/tt> and <tt>get<\/tt> are useful.<\/p>\n<p>You can use the <tt>get<\/tt> command if you want to know all the properties of a graphics object.  This is the same list of properties you see if you click the <tt>all properties<\/tt> link in the example above.<\/p>\n<pre class=\"codeinput\">get(p)\r\n<\/pre>\n<pre class=\"codeoutput\">    AlignVertexCenters: 'off'\r\n            Annotation: [1x1 matlab.graphics.eventdata.Annotation]\r\n          BeingDeleted: 'off'\r\n            BusyAction: 'queue'\r\n         ButtonDownFcn: ''\r\n              Children: []\r\n              Clipping: 'on'\r\n                 Color: [0 0.4470 0.7410]\r\n             CreateFcn: ''\r\n             DeleteFcn: ''\r\n           DisplayName: ''\r\n      HandleVisibility: 'on'\r\n               HitTest: 'on'\r\n         Interruptible: 'on'\r\n             LineStyle: '-'\r\n             LineWidth: 2\r\n                Marker: 'none'\r\n       MarkerEdgeColor: 'auto'\r\n       MarkerFaceColor: 'none'\r\n            MarkerSize: 6\r\n                Parent: [1x1 Axes]\r\n         PickableParts: 'visible'\r\n              Selected: 'off'\r\n    SelectionHighlight: 'on'\r\n                   Tag: ''\r\n                  Type: 'line'\r\n         UIContextMenu: []\r\n              UserData: []\r\n               Visible: 'on'\r\n                 XData: [1x101 double]\r\n             XDataMode: 'manual'\r\n           XDataSource: ''\r\n                 YData: [1x101 double]\r\n           YDataSource: ''\r\n                 ZData: [1x0 double]\r\n           ZDataSource: ''\r\n\r\n<\/pre>\n<p>The <tt>set<\/tt> function is useful if you want to know what options are available for a given property.  In this case you can call <tt>set<\/tt> with the property name but no value for the property.<\/p>\n<pre class=\"codeinput\">set(p,<span class=\"string\">'LineStyle'<\/span>)\r\n<\/pre>\n<pre class=\"codeoutput\">    '-'\r\n    '--'\r\n    ':'\r\n    '-.'\r\n    'none'\r\n\r\n<\/pre>\n<p>Another use of <tt>set<\/tt> occurs when you need to reference a property from an array of graphics objects. Suppose you have an array of line objects created by the <tt>plot<\/tt> command:<\/p>\n<pre class=\"codeinput\">x = 0:0.1:10;\r\ny1 = sin(x);\r\ny2 = cos(x);\r\nlineArray = plot(x,y1,x,y2)\r\n<\/pre>\n<pre class=\"codeoutput\">\r\nlineArray = \r\n\r\n  2x1 Line array:\r\n\r\n  Line\r\n  Line\r\n\r\n<\/pre>\n<p>You can use the <tt>set<\/tt> function to change the colors of all the lines in the array in a single command.<\/p>\n<pre class=\"codeinput\">set(lineArray, <span class=\"string\">'Color'<\/span>, <span class=\"string\">'blue'<\/span>)\r\n<\/pre>\n<h4>Have you starting using graphics objects in R2014b?<a name=\"ddb8ee09-d15d-422e-b7e7-fcf8a659388a\"><\/a><\/h4>\n<p>What do you think about the change to graphics objects in R2014b? Have you tried using dot notation for getting and setting graphics object properties? <\/p>\n<h4>Next up -- Part 3: Compatibility Considerations in the New Graphics System<a name=\"fc348d8e-39d3-4566-bb85-98ee47abfef7\"><\/a><\/h4>\n<p>There are some other changes in R2014b that will impact some existing MATLAB code.  These changes mostly impact advanced graphics users and people who build more complicated user interfaces.  Next time, I will describe the important changes and what steps you should take to make your code compatible with R2014b.  I'll also give you some guidance on how to write code that works in multiple releases.<\/p>\n<p><script language=\"JavaScript\"> <!-- \n    function grabCode_b79c40f0738f40fa88418cc7f281d1ff() {\n        \/\/ Remember the title so we can use it in the new page\n        title = document.title;\n\n        \/\/ Break up these strings so that their presence\n        \/\/ in the Javascript doesn't mess up the search for\n        \/\/ the MATLAB code.\n        t1='b79c40f0738f40fa88418cc7f281d1ff ' + '##### ' + 'SOURCE BEGIN' + ' #####';\n        t2='##### ' + 'SOURCE END' + ' #####' + ' b79c40f0738f40fa88418cc7f281d1ff';\n    \n        b=document.getElementsByTagName('body')[0];\n        i1=b.innerHTML.indexOf(t1)+t1.length;\n        i2=b.innerHTML.indexOf(t2);\n \n        code_string = b.innerHTML.substring(i1, i2);\n        code_string = code_string.replace(\/REPLACE_WITH_DASH_DASH\/g,'--');\n\n        \/\/ Use \/x3C\/g instead of the less-than character to avoid errors \n        \/\/ in the XML parser.\n        \/\/ Use '\\x26#60;' instead of '<' so that the XML parser\n        \/\/ doesn't go ahead and substitute the less-than character. \n        code_string = code_string.replace(\/\\x3C\/g, '\\x26#60;');\n\n        copyright = 'Copyright 2014 The MathWorks, Inc.';\n\n        w = window.open();\n        d = w.document;\n        d.write('\n\n<pre>\\n');\r\n        d.write(code_string);\r\n\r\n        \/\/ Add copyright line at the bottom if specified.\r\n        if (copyright.length > 0) {\r\n            d.writeln('');\r\n            d.writeln('%%');\r\n            if (copyright.length > 0) {\r\n                d.writeln('% _' + copyright + '_');\r\n            }\r\n        }\r\n\r\n        d.write('<\/pre>\n\n\\n');\n\n        d.title = title + ' (MATLAB code)';\n        d.close();\n    }   \n     --> <\/script><\/p>\n<p style=\"text-align: right; font-size: xx-small; font-weight:lighter;   font-style: italic; color: gray\"><a href=\"javascript:grabCode_b79c40f0738f40fa88418cc7f281d1ff()\"><span style=\"font-size: x-small;        font-style: italic;\">Get<br \/>\n      the MATLAB code <noscript>(requires JavaScript)<\/noscript><\/span><\/a><\/p>\n<p>      Published with MATLAB&reg; R2014b<\/p>\n<\/div>\n<p><!--\nb79c40f0738f40fa88418cc7f281d1ff ##### SOURCE BEGIN #####\n%% MATLAB R2014b Graphics - Part 2: Using Graphics Objects\n% Today, <mailto:david.garrison@mathworks.com David Garrison>, our guest\n% blogger, will continue his series on the new graphics system in R2014b.\n%\n% * Part 1: Features of the New Graphics System\n% * *Part 2: Using Graphics Objects*\n% * Part 3: Compatibility Considerations in the New Graphics System\n% \n% Here is Part 2 of the series. \n% \n%% What have we learned so far?\n%\n% In <www.mathworks.com Part 1>\n% of this series, I provided an introduction to the new MATLAB graphics\n% system in R2014b.  I described a number of new features and alluded to\n% one of the big changes in R2014b REPLACE_WITH_DASH_DASH _graphics functions return\n% MATLAB objects, not numeric handles_.\n\n%% The MATLAB Graphics System\n% When I use MATLAB, I usually don't think about the internal graphics\n% system.  Usually, I'm just trying to visualize some data.  I might call\n% one of the MATLAB charting functions, like |plot| or |bar| to understand\n% something important about my data.  I also create user interfaces using\n% functions like |uicontrol| or |uipanel|.  These are functions that are\n% part of the MATLAB graphics system.  \n%\n% Let's suppose that I am creating a plot and I want the line in the plot\n% to be red. I can do that in one of two ways. I can call the |plot|\n% function with some extra arguments like this.\n\nx = 0:0.1:10;\ny = sin(x);\nplot(x,y,'Color','red')\n  \n%%\n% I can also use the output argument of the |plot| command to modify my\n% plot after I've created it.  Here I created the plot first, then used the\n% |set| command to change the color of the line.\n\np = plot(x,y) ;\nset(p, 'Color', 'red')\n\n%% Pre-R2014b Numeric Handles\n% Prior to R2014b, a call to a graphics function would return a number like\n% this\n%\n%   p = plot(x,y)\n%\n%   p = \n%\n%      174.346\n\n%%\n% The value of the variable |p| was a special kind of number called a\n% _handle_.  The handle was a reference to a graphics object. The object\n% itself was not available to the user but you could use the handle to\n% retrieve or change properties of the object using the |set| and |get|\n% commands.  In the example above, we used the handle of the line object to\n% set its color.  In fact, when this capability first became available in\n% MATLAB, this approach was so new and useful it was given a special name\n% REPLACE_WITH_DASH_DASH _Handle Graphics_.\n%\n% All graphics handles were just numeric values.  Those values were\n% integers for figures and fractional values for everything else.  You\n% could use a handle anywhere you could use a number.  I've seen MATLAB\n% code where people stored their handles with other data in a double array\n% or used handles in functions where a number is expected as the argument\n% (e.g. math functions).\n%\n% As you probably know, graphics objects are stored as a tree structure\n% with parents and children.  There is a special object at the top of the\n% tree called the _graphics root_.  Prior to R2014b, the handle to the\n% graphics root was always |0|.  For example to get the list of all open\n% figures, you could type:\n\nmyFigures = get(0, 'Children');\n\n%% R2014b Graphics Objects\n% In R2014b, graphics functions do not return numeric handles any more.\n% They now return MATLAB objects.  Now when you call a graphics function\n% with an output argument, you see something like this:\n\np = plot(x,y)\n\n%%\n% The |plot| function now returns a |Line| object.  That line object has\n% properties.  When MATLAB displays the line object in the command window,\n% it shows the object's most common properties.  The |all properties| text\n% is a hyperlink that you can click to see all the properties of the\n% object.\n%\n% If you use the |whos| function to see more information about |p|,\n% you see something like this:\n\nwhos p\n\n%%\n% The _Class_ column in the |whos| output indicates what kind of object if\n% is.  What you see here is the full class name of the object.  Don't worry\n% too much about the details of the class name.  Most of you will never\n% need to use it.\n%\n% In R2014b, use the |groot| function to refer to the graphics root.\n \ngroot\n\n%% Getting and Setting Object Properties\n% One of the benefits of having graphic objects is that you can now get and\n% set their values using dot notation.  Dot notation has the form\n% |object.Property|.  It is the same syntax that you use when you want to\n% refer to the field of a structure.  For example, in R2014b, you can get\n% the color of the line above like this:\n\np.Color\n\n%%\n% Similarly, you can set the line width of the line using dot notation.\n\np.LineWidth = 2;\n\n%%\n% Dot notation is also useful if you want to set properties of two\n% objects to be the same.  Prior to R2014b, you might write code that looks\n% like this:\n%\n%   set(p2, 'Color', get(p1, 'Color'))\n\n%%\n% With dot notation, you can do the same thing with\n%\n%   p2.Color = p1.Color;\n\n%%\n% With dot notation you can also use tab completion when you are trying to\n% access a graphics object property.\n% \n% <<tab_completion.png>>\n% \n% You can still use the |set| and |get| functions but I find dot notation a\n% much more convenient way to refer to object properties. One note of\n% caution, however.  When you use dot notation you must use the correct\n% capitalization of the property name.  For example,\n%\n%   p.LineWidth\n\n%%\n% will return the value of the line width but\n%\n%   p.linewidth\n%\n% will cause an error.\n\n%% Using |set| and |get|\n% As I mentioned above, you can still use the |set| and |get| functions and\n% there are cases where |set| and |get| are useful. \n\n%%\n% You can use the |get| command if you want to know all the properties of a\n% graphics object.  This is the same list of properties you see if you\n% click the |all properties| link in the example above.\n\nget(p)\n\n%% \n% The |set| function is useful if you want to know what options are\n% available for a given property.  In this case you can call |set| with the\n% property name but no value for the property.\n\nset(p,'LineStyle')\n\n%%\n% Another use of |set| occurs when you need to reference a property from an\n% array of graphics objects. Suppose you have an array of line objects\n% created by the |plot| command:\n\nx = 0:0.1:10;\ny1 = sin(x);\ny2 = cos(x);\nlineArray = plot(x,y1,x,y2)\n\n%%\n% You can use the |set| function to change the colors of all the lines in\n% the array in a single command.\n\nset(lineArray, 'Color', 'blue')\n\n%% Have you starting using graphics objects in R2014b?\n% What do you think about the change to graphics objects in R2014b?\n% Have you tried using dot notation for getting and setting graphics\n% object properties?  We'd love to hear your thoughts\n% <https:\/\/blogs.mathworks.com\/loren\/?p=XXX#respond here>.\n%\n%% Next up REPLACE_WITH_DASH_DASH Part 3: Compatibility Considerations in the New Graphics System\n% There are some other changes in R2014b that will impact some existing\n% MATLAB code.  These changes mostly impact advanced graphics users and\n% people who build more complicated user interfaces.  Next time, I will\n% describe the important changes and what steps you should take to make\n% your code compatible with R2014b.  I'll also give you some guidance on\n% how to write code that works in multiple releases.\n\n##### SOURCE END ##### b79c40f0738f40fa88418cc7f281d1ff\n--><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"https:\/\/blogs.mathworks.com\/images\/loren\/2014\/tab_completion.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p><!--introduction--><\/p>\n<p>Today, <a href=\"mailto:david.garrison@mathworks.com\">David Garrison<\/a>, our guest blogger, will continue his series on the new graphics system in R2014b.... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/loren\/2014\/10\/14\/matlab-r2014b-graphics-part-2-using-graphics-objects\/\">read more >><\/a><\/p>\n","protected":false},"author":39,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[21,6],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/1042"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/users\/39"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/comments?post=1042"}],"version-history":[{"count":11,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/1042\/revisions"}],"predecessor-version":[{"id":1965,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/posts\/1042\/revisions\/1965"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/media?parent=1042"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/categories?post=1042"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/loren\/wp-json\/wp\/v2\/tags?post=1042"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}