{"id":125,"date":"2023-10-18T07:59:06","date_gmt":"2023-10-18T11:59:06","guid":{"rendered":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/?p=125"},"modified":"2023-10-18T07:59:06","modified_gmt":"2023-10-18T11:59:06","slug":"exploring-secondary-axis-labels-in-matlab","status":"publish","type":"post","link":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/2023\/10\/18\/exploring-secondary-axis-labels-in-matlab\/","title":{"rendered":"Exploring Secondary Axis Labels in MATLAB"},"content":{"rendered":"<div class=\"rtcContent\">\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">One of our missions for this blog is to boost our readers' familiarity with the latest features and to keep you in the forefront of MATLAB graphics and app building advancements. Last week I mentioned that MATLAB R2023b has more than two dozen <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/release-notes.html?category=graphics&amp;category=app-building&amp;rntext=&amp;startrelease=R2023b&amp;endrelease=R2023b&amp;groupby=release&amp;sortby=descending&amp;searchHighlight=\">new features<\/a> in the graphics and app building domains. Help us achieve our goal by letting us know which new features you would like to see covered in the blog!<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">One of my favorite features from R2023b is a trio of convenience functions that control secondary labels on Cartesian axes. <\/span><\/div>\n<ul style=\"margin: 10px 0px 20px;padding-left: 0px;font-family: Helvetica, Arial, sans-serif;font-size: 14px\">\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\"><a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/xsecondarylabel.html\"><span style=\"font-weight: bold;font-family: monospace\">xsecondarylabel<\/span><\/a><\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\"><a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/ysecondarylabel.html\"><span style=\"font-weight: bold;font-family: monospace\">ysecondarylabel<\/span><\/a><\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\"><a href=\"https:\/\/www.mathworks.com\/help\/matlab\/ref\/zsecondarylabel.html\"><span style=\"font-weight: bold;font-family: monospace\">zsecondarylabel<\/span><\/a><\/li>\n<\/ul>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">You might be wondering, <span style=\"font-weight: bold\">what are secondary labels<\/span>?<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Secondary labels are designed to display additional information about an axis such as tick label units. By default, MATLAB adds a secondary label next to an axis when plotting datetime values, duration values, or numeric values in exponential form. The use of secondary labels often simplifies tick labels by eliminating repetitive information such as including the same year in all datetime tick labels. Here are some automatically generated secondary labels for numeric, duration, and datetime rulers.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><img decoding=\"async\" loading=\"lazy\" class=\"imageNode\" style=\"vertical-align: baseline;width: 669px;height: 478px\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2023\/10\/secondaryLabels_23b.mlx-10-17-23_1-1.png\" alt=\"\" width=\"669\" height=\"478\" \/><\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">To generate a datetime example similar to the purple axes above,<\/div>\n<div class=\"preformatted-matlab\" style=\"margin: 10px 3px 10px 55px;padding: 10px 10px 10px 5px\">\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">date1 = datetime(2023,09,13,0,3,0) + seconds(-45:5:45);<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">date2 = datetime(2023,10,28,0,0,0) + days(-45:5:45);<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">plot(date1, date2, <span style=\"color: #a709f5\">\"o\"<\/span>);<\/div>\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">axis <span style=\"color: #a709f5\">tight<\/span><\/div>\n<\/div>\n<h2 style=\"margin: 20px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Controlling secondary labels in MATLAB R2023b<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Here are some common situations reported by MATLAB users where these functions will come in handy.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">Remove a secondary label. <\/span>Time-of-day is the focus of your data and you don't want to show the date in the purple axes above. Remove the secondary label using,<\/div>\n<div class=\"preformatted-matlab\" style=\"margin: 10px 3px 10px 55px;padding: 10px 10px 10px 5px\">\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">xsecondarylabel(Visible = <span style=\"color: #a709f5\">\"off\"<\/span>)<\/div>\n<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">Change a secondary label. <\/span>In your manuscript, \"hr\" is used to indicate \"heart rate\" and you want to change \"hr\" in the orange axes above to \"hours\". Change the secondary label using,<\/div>\n<div class=\"preformatted-matlab\" style=\"margin: 10px 3px 10px 55px;padding: 10px 10px 10px 5px\">\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">ysecondarylabel(<span style=\"color: #a709f5\">'hours'<\/span>)<\/div>\n<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">Add your own secondary label. <\/span>You're working with scaled data such that the values 0.5 and 1.0 should be interpreted as five million and ten million. Add the exponent notation shown in the blue axes above using,<\/div>\n<div class=\"preformatted-matlab\" style=\"margin: 10px 3px 10px 55px;padding: 10px 10px 10px 5px\">\n<div style=\"border-radius: 0px;padding: 0px;line-height: 15.6px;min-height: 16px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 12px\">xsecondarylabel(<span style=\"color: #a709f5\">'x10^7'<\/span>)<\/div>\n<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\"><span style=\"font-weight: bold\">Label axis units. <\/span> This is my favorite reason to use these new functions. Label the axes' units without relying on the xlabel or ylabel. Let's look at a full demo below.<\/div>\n<h3 style=\"margin: 15px 10px 5px 4px;padding: 0px;line-height: 18px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 17px;font-weight: bold;text-align: left\">Demo: using secondary labels to indicate axis units<\/h3>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">In 1662 Robert Boyle discovered that the volume of an ideal gas is inversely proportional to the pressure exerted upon the gas assuming constant temperature (Boyle's Law). Graphical visualizations were not yet common in 1662 so Boyle published his results as a <a href=\"https:\/\/journals.physiology.org\/doi\/full\/10.1152\/jappl.1999.87.4.1543\" target=\"_blank\">table of numbers<\/a>. Let's plot the results to show the relationship between pressure and volume for ideal gases.<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Read in Boyle's data from 1662 using Boyle's original generic variable names. We'll use columns A2 (gas volume) and D (pressure). For a complete explanation of the table variables, see <a href=\"https:\/\/journals.physiology.org\/doi\/full\/10.1152\/jappl.1999.87.4.1543\" target=\"_blank\">J. B. West (1999, J Appl Physiol)<\/a>.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 0 10px 0\">\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">T = readtable(<span style=\"color: #a709f5\">\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/boylesData.csv\"<\/span>)<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsVariableTableElement\" style=\"width: calc(100% - 5px)\" data-testid=\"output_0\">\n<div id=\"variableeditor_client_Document_0\" class=\"ClientDocument veSpecifier table constrictHeight\" aria-labelledby=\"variableeditor_views_SummaryBar_0\">\n<div class=\"summaryBar\" style=\"font-size: 12px;font-family: Consolas, Inconsolata, Menlo, monospace\">T = <span style=\"font-style: normal\">25\u00d76 table <\/span><\/div>\n<div id=\"variableeditor_TableViewModel_0\" class=\"table ClientViewDiv hasSummaryBar\" style=\"width: 100%;overflow: auto\" data-viewid=\"__1\">\n<table style=\"border-spacing: 0px;border-collapse: collapse\" cellspacing=\"0\">\n<thead>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;text-align: left;font-weight: bold\" rowspan=\"1\"><\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">A<\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">A2<\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">B<\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">C<\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">D<\/th>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 82px;min-width: 82px;max-width: 82px;text-align: center;font-weight: bold\">E<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">1<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">48<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">12<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">0<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">2<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">46<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">11.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">1.4375<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">30.562<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">30.375<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">3<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">44<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">11<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">2.8125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">31.938<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">31.75<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">4<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">42<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">10.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">4.375<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">33.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">33.143<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">5<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">40<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">10<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">6.1875<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">35.312<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">35<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">6<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">38<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">9.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">7.875<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">37<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">36.789<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">7<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">36<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">9<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">10.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">39.312<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">38.875<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">8<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">34<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">8.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">12.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">41.625<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">41.118<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">9<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">32<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">8<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">15.062<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">44.188<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">43.688<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">10<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">30<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">7.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">17.938<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">47.062<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">46.6<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">11<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">28<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">7<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">21.188<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">50.312<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">50<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">12<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">26<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">6.5<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">25.188<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">54.312<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">53.769<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">13<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">24<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">6<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.688<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">58.812<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">58.25<\/td>\n<\/tr>\n<tr>\n<th style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 6px 3px 3px;width: 34px;border-width: 0px 1px 1px;border-style: solid;text-align: left;font-weight: bold\">14<\/th>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">23<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">5.75<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">32.188<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">29.125<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">61.312<\/td>\n<td style=\"font-family: Arial, sans-serif;font-size: 12px;overflow: hidden;padding: 3px;width: 82px;min-width: 82px;max-width: 82px;border-width: 0px 1px 1px;border-style: solid;text-align: right\">60.783<\/td>\n<\/tr>\n<tr>\n<th>\u22ee<\/th>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Boyle trapped gas between the end of a j-shaped tube and a column of mercury. He measured pressure upon the gas in units of <span style=\"font-style: italic\">inHG<\/span> or <span style=\"font-style: italic\">inches of mercury <\/span>by gradually adding mercury to the tube which increases the pressure on the gas. Volume of the gas was measured by the height of the gas pocket at the end of the tube, in inches. I dug deep searching for the diameter of his tube so we could use actual units of volume but couldn't find it. Inches will suffice assuming the tube had a uniform diameter. A shout-out is waiting for anyone who can find Boyle's tube diameter from a credible source!<\/div>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Boyle treated volume as the independent variable (table variable <span style=\"font-family: monospace\">A2<\/span>) so we'll plot volume along the x-axis and pressure (table variable <span style=\"font-family: monospace\">D<\/span>) on the y-axis.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 0 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">figure();<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">plot(T.A2, T.D, <span style=\"color: #a709f5\">\"-s\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">grid <span style=\"color: #a709f5\">on<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">title(<span style=\"color: #a709f5\">\"Boyle's Data\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">xlabel(<span style=\"color: #a709f5\">\"Volume\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px 0px 4px 4px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ylabel(<span style=\"color: #a709f5\">\"Pressure\"<\/span>)<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Add secondary labels to indicate axis units (starting in MATLAB R2023b).<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 0 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">xsecondarylabel(<span style=\"color: #a709f5\">\"in\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ysecondarylabel(<span style=\"color: #a709f5\">\"inHg\"<\/span>)<\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_1\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" class=\"figureImage figureContainingNode\" style=\"max-width: 560px;width: 560px;padding-bottom: 0px\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2023\/10\/secondaryLabels_23b.mlx-10-17-23_2-1.png\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<div style=\"margin: 10px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">Boyle's data shows that the volume of the gas is inversely proportional to the pressure exerted upon it. As pressure falls, volume increases like a balloon expanding in a vacuum. This relationship is beautifully shown by plotting the reciprocal of pressure against volume.<\/div>\n<div style=\"background-color: #f5f5f5;margin: 10px 0 10px 0\">\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 4px 4px 0px 0px;padding: 6px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">figure()<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">plot(T.A2, 1.\/T.D, <span style=\"color: #a709f5\">\"-o\"<\/span>);<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">grid <span style=\"color: #a709f5\">on<\/span><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">xlim([0, 15])<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ylim([0, 0.04])<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">title(<span style=\"color: #a709f5\">\"Boyle's Law\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">xlabel(<span style=\"color: #a709f5\">\"Volume\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ylabel(<span style=\"color: #a709f5\">\"Inverse of pressure\"<\/span>)<\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\"><\/div>\n<\/div>\n<div class=\"inlineWrapper\">\n<div style=\"border-radius: 0px;padding: 0px 45px 0px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">xsecondarylabel(<span style=\"color: #a709f5\">\"in\"<\/span>);<\/div>\n<\/div>\n<div class=\"inlineWrapper outputs\">\n<div style=\"border-radius: 0px;padding: 0px 45px 4px 13px;line-height: 18.004px;min-height: 0px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px\">ysecondarylabel(<span style=\"color: #a709f5\">\"inHg^-1\"<\/span>)<\/div>\n<\/div>\n<div style=\"padding: 10px 0px 6px 17px;font-family: Menlo, Monaco, Consolas, 'Courier New', monospace;font-size: 14px;line-height: 17.234px\">\n<div class=\"inlineElement eoOutputWrapper disableDefaultGestureHandling embeddedOutputsFigure\" data-testid=\"output_2\">\n<div class=\"figureElement eoOutputContent\"><img decoding=\"async\" class=\"figureImage figureContainingNode\" style=\"max-width: 560px;width: 560px;padding-bottom: 0px\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2023\/10\/secondaryLabels_23b.mlx-10-17-23_3-1.png\" \/><\/div>\n<\/div>\n<\/div>\n<\/div>\n<h2 style=\"margin: 20px 10px 5px 4px;padding: 0px;line-height: 20px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 20px;font-weight: bold;text-align: left\">Join the conversation!<\/h2>\n<div style=\"margin: 2px 10px 9px 4px;padding: 0px;line-height: 21px;min-height: 0px;font-family: Helvetica, Arial, sans-serif;font-style: normal;font-size: 14px;font-weight: 400;text-align: left\">We've learned how to change, create, or remove a secondary label. Let's continue the discussion in the comments section below!<\/div>\n<ul style=\"margin: 10px 0px 20px;padding-left: 0px;font-family: Helvetica, Arial, sans-serif;font-size: 14px\">\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">What other customizations would be helpful with secondary labels?<\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">What other recent <a href=\"https:\/\/www.mathworks.com\/help\/matlab\/release-notes.html?category=graphics&amp;category=app-building&amp;rntext=&amp;startrelease=R2023b&amp;endrelease=R2023b&amp;groupby=release&amp;sortby=descending&amp;searchHighlight=\">new features in graphics and app building<\/a> are you interested in learning more about?<\/li>\n<li style=\"margin-left: 56px;line-height: 21px;min-height: 0px;text-align: left\">Do you think Robert Boyle's interest in pressure and volume was affected by being the 14th child in his family?<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<\/div>\n<p><script type=\"text\/javascript\">\n{ let css = '.embeddedOutputsVariableTableElement .ClientViewDiv  table tr {  height: 22px;  white-space: nowrap;} .embeddedOutputsVariableTableElement .ClientViewDiv  table tr td,.embeddedOutputsVariableTableElement .ClientViewDiv  table tr th {  background-color:white;  text-overflow: ellipsis;  font-family: Arial, sans-serif;  font-size: 12px;  overflow : hidden;} .embeddedOutputsVariableTableElement .ClientViewDiv  table tr span {  text-overflow: ellipsis;  padding: 3px;} .embeddedOutputsVariableTableElement .ClientViewDiv  table tr th {    color: rgba(0,0,0,0.5);  padding: 3px;  font-size: 9px;} \/* ClientDocument has a summary bar child that takes up 17px, this clashes with overflow on the view which allots space for scrollbars. On print preview, this causes headers from <\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<\/p>\n<thead>\n<\/p>\n<\/p>\n<p> to overlap on subsequent pages. Displaying Document as flex renders summarybar and view in column format and fixes the issue g2788485 *\/.embeddedOutputsVariableTableElement .ClientDocument {  display: flex;  flex-direction: column;}';\nlet head = document.head || document.getElementsByTagName('head')[0];\nlet style = document.createElement('style');\nhead.appendChild(style);\nstyle.type = 'text\/css';\nif (style.styleSheet) {\n    style.styleSheet.cssText = css;\n} else {\n    style.appendChild(document.createTextNode(css));\n}<\/p>\n<p>}<\/script><\/p>\n","protected":false},"excerpt":{"rendered":"<div class=\"overview-image\"><img decoding=\"async\"  class=\"img-responsive\" src=\"http:\/\/blogs.mathworks.com\/graphics-and-apps\/files\/2023\/10\/secondaryLabels_23b.mlx-10-17-23_1-1.png\" onError=\"this.style.display ='none';\" \/><\/div>\n<p>\nOne of our missions for this blog is to boost our readers' familiarity with the latest features and to keep you in the forefront of MATLAB graphics and app building advancements. Last week I... <a class=\"read-more\" href=\"https:\/\/blogs.mathworks.com\/graphics-and-apps\/2023\/10\/18\/exploring-secondary-axis-labels-in-matlab\/\">read more >><\/a><\/p>\n","protected":false},"author":198,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[14,11,20],"tags":[],"_links":{"self":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/125"}],"collection":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/users\/198"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/comments?post=125"}],"version-history":[{"count":33,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/125\/revisions"}],"predecessor-version":[{"id":359,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/posts\/125\/revisions\/359"}],"wp:attachment":[{"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/media?parent=125"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/categories?post=125"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blogs.mathworks.com\/graphics-and-apps\/wp-json\/wp\/v2\/tags?post=125"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}