1 / 27

Designing Effective Graphics Using MATLAB

Designing Effective Graphics Using MATLAB. The Cain Project in Engineering and Professional Communication Linda Driskill, driskila@ruf.rice.edu Gang Cheng, gang@rice.edu. The Purpose of Using Graphs. In problem solving As part of design As analysis of operating data

blake-greer
Télécharger la présentation

Designing Effective Graphics Using MATLAB

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Designing Effective Graphics Using MATLAB The Cain Project in Engineering and Professional Communication Linda Driskill,driskila@ruf.rice.edu Gang Cheng,gang@rice.edu

  2. The Purpose of Using Graphs • In problem solving • As part of design • As analysis of operating data • For persuasion and interpretation • Dramatize relationships • Promote identification • Make complex information accessible

  3. Checklist for Good Graphics • Purpose clear? • Critical components defined? • Pattern and arrangement lead eye without distraction? • Graphic hierarchy consistent? • Fonts legible? • Presenter’s expertise shown?

  4. Types of Graph in Matlab • Line graph • 2D • 3D • Bar graph • Pie graph • Ribbon graph

  5. Considerations • Purpose • Problem solving? • Persuasion and interpretation? • Audience • What are their background? • What are they interested to know? • Context • Presentation? • Report/Paper?

  6. Context • Presentation • Big fonts • Can use any color • Can use animation • Report • Smaller fonts • Often just black and white • Animation impossible

  7. An Example • You have: • Vector 1: x[0:0.2:10]; • Vector 2: sin(x); • Vector 3: cos(x); • You are asked to: • Plot sin(x) vs. x and cos(x) vs. x in the same figure; • Customize the figure so that it becomes suitable for being used in a presentation. • Customize the figure so that it becomes suitable for being used in a report/paper.

  8. A Simple Matlab Program %start clear all; %clear the memory X=[0:0.2:10]; %define the x vector sinx=sin(x); %calculate sin(x) cosx=cos(x); %calculate sin(x) plot(x,sinx,x,cosx); %plot the lines xlabel('x'); %add x label ylabel('y'); %add y label title([‘sin and cos Functions']); %add title %end

  9. Default Figure Given by Matlab

  10. We Want … • Titles and labels bigger. • Lines thicker. • Colors more contrasting. • Insert Legend. • Data points shown. • Try adding gridlines.

  11. title Y label X label Tick and tick label Anatomy of a Matlab Figure Axes lines

  12. Figure Properties Open the Property Editor

  13. Figure Immediate apply Edit Figure Properties

  14. axes Edit Axes Properties

  15. line Edit Line Properties

  16. A Better-Looking Figure

  17. legend Insert Legend

  18. Legend Inserted Select object

  19. Make Room for Legend

  20. legend Edit Legend Properties

  21. axes Grid Show Insert Y Grid Line

  22. Final

  23. Figure for Report/Paper

  24. Frequently Used Functions • “plot” • “xlabel”,“ylabel” • “title” • “xlim”, “ylim” • “axis” • “legend” • “errorbar” • Type “help function name” in Matlab command window for detailed information on the usage of the function.

  25. Other 2D Plotting Functions • “loglog”: graph with logarithmic scales for both axes. • “semilogx”: graph with a logarithmic scale for x-axis and a linear scale for y-axis. • “semilogy”: graph with a logarithmic scale for y-axis and a linear scale for x-axis. • “plotyy”: graph with y-tick labels on the left and right side.

  26. A Whole Lot More … • 2D contour • “contour” • “contourslice” • 3D plots • “plot3” • “mesh” • “surf” • Movie • “getframe” • “movie”

  27. A Bioartificial Tissue Seeded with Cells Z = 40 Z = 1 Sample Movie A movie created with mesh, getframe and movie

More Related