MATLAB Function Reference (Volume 2: Graphics)
MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)
colorbarPurpose2colorbarDisplay colorbar showing the color scaleSyntaxDescriptioncolorbarcolorbar('vert')colorbar('horiz')colorbar(h)h = colorbar(...)The colorbar function displays the current colormap in the current figure andresizes the current axes to accommodate the colorbar.colorbar updates the most recently created colorbar or, when the current axesdoes not have a colorbar, colorbar adds a new vertical colorbar.colorbar('vert') adds a vertical colorbar to the current axes.colorbar('horiz') adds a horizontal colorbar to the current axes.colorbar(h) places a colorbar in the axes identified by h. The colorbar ishorizontal if the width of the axes is greater than its height, as determined bythe axes Position property.h = colorbar(...) returns a handle to the colorbar, which is an axesgraphics object.Remarkscolorbar works with two-dimensional and three-dimensional plots.2-82
colorbarExamplesDisplay a colorbar beside the axes.surf(peaks(30))colormap coolcolorbar81086426420−20−4−6−8302520151050051015202530−2−4−6See Alsocolormap2-83
- Page 61 and 62: Axes PropertiesTypestring (read onl
- Page 63 and 64: Axes PropertiesXLabel, YLabel, ZLab
- Page 65 and 66: axisPurpose2axisAxis scaling and ap
- Page 67 and 68: axisaxis normal automatically adjus
- Page 69 and 70: axisThe right figure shows a more s
- Page 71 and 72: ar, barhPurpose2bar, barhBar chartS
- Page 73 and 74: ar, barhExamplesPlot a bell shaped
- Page 75 and 76: ar3, bar3hPurpose2bar3, bar3hThree-
- Page 77 and 78: ar3, bar3hsubplot(3,2,4)bar3(Y,0.5,
- Page 79 and 80: oxPurpose2boxControl axes borderSyn
- Page 81 and 82: camdollyPurpose2camdollyMove the ca
- Page 83 and 84: camlightPurpose2camlightCreate or m
- Page 85 and 86: camlookatPurpose2camlookatPosition
- Page 87 and 88: camorbitPurpose2camorbitRotate the
- Page 89 and 90: campanPurpose2campanRotate the came
- Page 91 and 92: camposSee Alsoaxis, camproj, camtar
- Page 93 and 94: camrollPurpose2camrollRotate the ca
- Page 95 and 96: camtargetExamplesThis example moves
- Page 97 and 98: camupSee Alsoaxis, camproj, campos,
- Page 99 and 100: camvaSetting a camera view angle or
- Page 101 and 102: capturePurpose2captureis obsolete i
- Page 103 and 104: caxismap them to an entry in the co
- Page 105 and 106: caxisThe blue color of the ocean is
- Page 107 and 108: clabelPurpose2clabelContour plot el
- Page 109 and 110: clfPurpose2clfClear current figure
- Page 111: closemust specify the hidden option
- Page 115 and 116: colormapPurpose2colormapSet and get
- Page 117 and 118: colormapExamplesThe images and colo
- Page 119 and 120: ColorSpecPurpose2ColorSpecspecifica
- Page 121 and 122: cometPurpose2cometTwo-dimensional c
- Page 123 and 124: compassPurpose2compassPlot arrows e
- Page 125 and 126: coneplotPurpose2coneplotPlot veloci
- Page 127 and 128: coneplot• Draw the cones, setting
- Page 129 and 130: coneplotSee Alsoisosurface, patch,
- Page 131 and 132: contourRemarksExamplesIf you do not
- Page 133 and 134: contour4512104010358830810258201510
- Page 135 and 136: contour3RemarksExamplesIf you do no
- Page 137 and 138: contourccontours using a regularly
- Page 139 and 140: contourfExamplesCreate a filled con
- Page 141 and 142: contoursliceExamplesThis example us
- Page 143 and 144: contrastPurpose2contrastGrayscale c
- Page 145 and 146: copyobjExamplesCopy a surface to a
- Page 147 and 148: cylinderExamplesCreate a cylinder w
- Page 149 and 150: daspectPurpose2daspectSet or query
- Page 151 and 152: daspectSetting the data aspect rati
- Page 153 and 154: datetickDateform Format Example12 m
- Page 155 and 156: default4Purpose2default4MATLAB Vers
- Page 157 and 158: dragrectPurpose2dragrectDrag rectan
- Page 159 and 160: errorbarPurpose2errorbarPlot error
- Page 161 and 162: errordlgPurpose2errordlgCreate and
colorbarPurpose2colorbarDisplay colorbar showing the color scaleSyntaxDescriptioncolorbarcolorbar('vert')colorbar('horiz')colorbar(h)h = colorbar(...)The colorbar function displays the current colormap in the current figure andresizes the current axes to accommodate the colorbar.colorbar updates the most recently created colorbar or, when the current axesdoes not have a colorbar, colorbar adds a new vertical colorbar.colorbar('vert') adds a vertical colorbar to the current axes.colorbar('horiz') adds a horizontal colorbar to the current axes.colorbar(h) places a colorbar in the axes identified by h. The colorbar ishorizontal if the width of the axes is greater than its height, as determined bythe axes Position property.h = colorbar(...) returns a handle to the colorbar, which is an axesgraphics object.Remarkscolorbar works with two-dimensional and three-dimensional plots.2-82