% COPYGRAPHICS Copy plot or graphics content to clipboard
%   COPYGRAPHICS(OBJ) copies the specified graphics to the clipboard
%   OBJ is the handle of any type of an axes, a figure, a chart that can 
%   be a child of the figure, a tiled chart layout, or a container within 
%   the figure.
%
%   COPYGRAPHICS(___, OPTIONS) copies the graphics to the clipboard, applying  
%   the specified OPTIONS. OPTIONS is one or more of the following 
%   name-value pairs. 
%
%   'ContentType', CONTENTTYPE  how to generate content when copying in vector format
%   CONTENTTYPE can be one of the following values
%   - 'vector' to generate vectorized (scalable) output 
%   - 'image'  to generate rasterized output (embed image) 
%   - 'auto'   allow MATLAB heuristic to decide
%   The default value is 'auto'
%
%   'Resolution', DPI  specifies output resolution for images. DPI must be
%   a positive whole number. The default value is 150
% 
%   'BackgroundColor', COLORSPEC  specifies the color to use as the background 
%   COLORSPEC can be one of the following values
%   - a color name, such as 'red', or 'w'
%   - an RGB triplet, such as [1 0 0] or [1 1 1]
%   - a hexadecimal color code, such as '#FFF' or '#FFFFFF')
%   - 'none' to use either a white or transparent background, depending on 
%      what the output format supports 
%   - 'current' to use the graphic's current background color
%   The default value is 'white' 
%
%   'Colorspace', COLORSPACE  the color space to use when generating output
%   COLORSPACE can be one of the following values
%   - 'rgb'  generates RGB true color output
%   - 'gray' generates grayscale output
%   The default value is 'rgb'
%
%   Example: Copy a plot to clipboard
%      plot(rand(3)); 
%      copygraphics(gca); 
%
%   Example: Copy a plot to the clipboard and ensure output is vectorized/scalable 
%      plot(rand(3)); 
%      copygraphics(gca, 'ContentType', 'vector');
%
%   Example: Copy a plot to the clipboard as an image 
%      plot(rand(3)); 
%      copygraphics(gca, 'ContentType', 'image');
%
%   Example: Copy a specific plot from figure to the clipboard
%      fig = figure; 
%      ax1 = subplot(2,1,1); bar(magic(4));
%      ax2 = subplot(2,1,2); plot(rand(4));
%      copygraphics(ax2); 
%
%   Example: Copy all plots from figure to the clipboard
%      fig = figure; 
%      subplot(2,1,1); bar(magic(4));
%      subplot(2,1,2); plot(rand(4));
%      copygraphics(fig); 
% 
%   Example: Copy a plot to the clipboard using grayscale colors
%      plot(rand(3)); 
%      copygraphics(gca, 'Colorspace', 'gray');
% 
%   See also EXPORTGRAPHICS, EXPORTAPP

 
%   Copyright 2019-2022 The MathWorks, Inc.

