Giter Club home page Giter Club logo

figure2struct's Introduction

figure2struct

Categorize MATLAB graphics objects in a figure/axes and return them as fields of a structure

  h = figure2struct(src)

src : handle of a figure, an axes or handles of its children. gcf by default. When a figure is given, the returning struct h has the same number of rows and columns as the subplots. The rows and columns are determined based on the position, without using subplot. So this function can be used with figures where the subplots are repositioned, e.g., for printing.

h(row,col) : a struct containing the following fields:

  • axes
  • children (all children regardless of kind)
  • line
  • text
  • legend
  • marker (line with LineStyle = 'none'),
  • segment (line with only two coordinates),
  • segment_vert
  • segment_horz
  • crossline (line that spans at least one axis)
  • nonsegment (lines that connect more than two points).

To use just one axes out of multiple subplots, use:

  copyobj(h(row,col).axes, figure);

To find a subset of the objects, use findobj. For example:

  red_markers = findobj(h(row,col).marker, 'Color', [1 0 0]);

figure2struct's People

Contributors

yulkang avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.