MATLAB Function Reference (Volume 2: Graphics)
MATLAB Function Reference (Volume 2: Graphics) MATLAB Function Reference (Volume 2: Graphics)
plotyyPurpose2plotyyCreate graphs with y axes on both left and right sideSyntaxDescriptionplotyy(X1,Y1,X2,Y2)plotyy(X1,Y1,X2,Y2,'function')plotyy(X1,Y1,X2,Y2,'function1','function2')[AX,H1,H2] = plotyy(...)plotyy(X1,Y1,X2,Y2) plots X1 versus Y1 with y-axis labeling on the left andplots X2 versus Y2 with y-axis labeling on the right.plotyy(X1,Y1,X2,Y2,'function') uses the plotting function specified by thestring 'function' instead of plot to produce each graph. 'function' can be plot,semilogx, semilogy, loglog, stem or any MATLAB function that accepts thesyntax:h = function(x,y)plotyy(X1,Y1,X2,Y2,'function1','function2') uses function1(X1,Y1) toplot the data for the left axis and function1(X2,Y2) to plot the data for theright axis.[AX,H1,H2] = plotyy(...) returns the handles of the two axes created in AXand the handles of the graphics objects from each plot in H1 and H2. AX(1) isthe left axes and AX(2) is the right axes.ExamplesCreate a graph using the plot function and two y-axes.t = 0:pi/20:2*pi;y1 = sin(t);y2 = 0.5*sin(t-1.5);plotyy(t,y1,t,y2,’plot’)2-362
plotyy10.500−10 1 2 3 4 5 6 7 −0.5See Alsoplot, loglog, semilogx, semilogy, axes properties: XAxisLocation,YAxisLocationThe axes chapter in the Using MATLAB Graphics manual for information onmulti-axis axes.2-363
- Page 341 and 342: pagedlgPurpose2pagedlgDisplay page
- Page 343 and 344: patchPurpose2patchCreate patch grap
- Page 345 and 346: patchColor Data InterpretationYou c
- Page 347 and 348: patch2V2 V31.91.8V51.71.61.51.41.31
- Page 349 and 350: patchRootFigureAxesUicontrolUimenuU
- Page 351 and 352: patchProperty Name Property Descrip
- Page 353 and 354: patchProperty Name Property Descrip
- Page 355 and 356: Patch PropertiesButtonDownFcn strin
- Page 357 and 358: Patch PropertiesThe second diagram
- Page 359 and 360: Patch PropertiesYou can also set th
- Page 361 and 362: Patch PropertiesFaceColor{ColorSpec
- Page 363 and 364: Patch Properties• An n-by-1 matri
- Page 365 and 366: Patch Propertiesprotect GUIs from c
- Page 367 and 368: Patch PropertiesMarker Specifierd^v
- Page 369 and 370: Patch PropertiesYou can also set th
- Page 371 and 372: pbaspectPurpose2pbaspectSet or quer
- Page 373 and 374: pbaspectIt is also interesting to l
- Page 375 and 376: pbaspect0.50−0.520−2−2020.50
- Page 377 and 378: pcolorExamplesA Hadamard matrix has
- Page 379 and 380: peaksPurpose2peaksA sample function
- Page 381 and 382: pieExamplesEmphasize the second sli
- Page 383 and 384: plotPurpose2plotLinear 2-D plotSynt
- Page 385 and 386: plotproduce this graph.3210−1−2
- Page 387 and 388: plot1Plot of sin(Θ)0.80.60.40.2sin
- Page 389 and 390: plot33530252015105010.510−0.5−1
- Page 391: plotmatrix50−51050−51050−5−
- Page 395 and 396: polarSee Alsocart2pol, compass, Lin
- Page 397 and 398: print, printoptpcmd and dev are pla
- Page 399 and 400: print, printoptDevice-dcdj550-dpain
- Page 401 and 402: print, printoptOption-rnumber-adobe
- Page 403 and 404: print, printoptTroubleshooting MS-W
- Page 405 and 406: print, printoptNotes on Printing In
- Page 407 and 408: printdlgPurpose2printdlgDisplay pri
- Page 409 and 410: questdlgExampleCreate a question di
- Page 411 and 412: quiverExamples Plot the gradient fi
- Page 413 and 414: quiver3Examples Plot the surface no
- Page 415 and 416: ox• For box definition, initialRe
- Page 417 and 418: ectanglevertical curvature can be d
- Page 419 and 420: ectangleThis example creates an ell
- Page 421 and 422: ectangleProperty Name Property Desc
- Page 423 and 424: ectangle propertiesRectanglePropert
- Page 425 and 426: ectangle propertiesEraseMode{normal
- Page 427 and 428: ectangle propertiesHitTest{on} | of
- Page 429 and 430: ectangle propertiesVisible{on} | of
- Page 431 and 432: educepatchThe number of output tria
- Page 433 and 434: educevolumePurpose2reducevolumeRedu
- Page 435 and 436: educevolumeSee Alsoisosurface, isoc
- Page 437 and 438: esetPurpose2resetReset graphics obj
- Page 439 and 440: gbplotPurpose2rgbplotPlot colormapS
- Page 441 and 442: ibbonExamplesCreate a ribbon plot o
plotyy10.500−10 1 2 3 4 5 6 7 −0.5See Alsoplot, loglog, semilogx, semilogy, axes properties: XAxisLocation,YAxisLocationThe axes chapter in the Using <strong>MATLAB</strong> <strong>Graphics</strong> manual for information onmulti-axis axes.2-363