plots.util

plots.util.save_fig_with_diagnostic(fig, fig_name, pdf_prefix)

Function save_fig_with_diagnostic()

Parameters:
  • fig – Figure handle

  • fig_name – fig_name

  • pdf_prefix – pdf_prefix

Returns:

diagnostic

saves a pdf of a figure, robustly handling cases of gobjects, deleted handles, and invalid figures

plots.util.table2latex(tab, filename, special_col_spec, special_first_row)

Error detection and default parameters()

plots.util.save_pdf(fig, filename)

Function save_pdf()

param fig:

Figure handle

param filename:

filename

SAVE_PDF Save figure as pdf to specified filename

plots.util.color_each_element(matrix)

Function color_each_element()

Parameters:

matrix – matrix

Returns:

f

plots.util.improvePlot()

Function improvePlot()

Plot parameters() MATLAB treats mac and PC displays differently which can create weird looking graphs. Here we handle system differences

plots.util.remove_underscores(cell_str_in)

Function remove_underscores()

param cell_str_in:

cell_str_in

returns:

cell_str_out

REMOVE_UNDERSCORES Replaces underscores with spaces and capitalizes each word

plots.util.write_vars_to_tex(varargin)

Function write_vars_to_tex()

Parameters:

varargin – varargin

plots.util.hatchfill2(A, varargin)

Function hatchfill2()

Parameters:
  • A – A

  • varargin – varargin

Returns:

H

v3.0.0.0 https://www.mathworks.com/matlabcentral/fileexchange/53593-hatchfill2()

plots.util.signed_log(Z_data, C, levels, X_data, Y_data)

Function signed_log()

Parameters:
  • Z_data – Z_data

  • C – C

  • levels – levels

  • X_data – X_data

  • Y_data – Y_data

modified from the following https://www.mathworks.com/matlabcentral/answers/1700655-symmetric-diverging-log-color-scale#answer_1380451

plots.util.imrange(inpict)

Function imrange()

Parameters:

inpict – inpict

Returns:

minval

Returns:

maxval [min max] = IMRANGE(INPICT)

returns the global min and max pixel values in INPICT

INPICT can be a vector or array of any dimension or class

plots.util.hatchfill2_demo

HATCHFILL2_DEMO Demonstration script for HATCHFILL2 function 4 examples from original HATCHFILL by Neil Tandon a bar plot example

plots.util.bluewhitered(m, white_number)

Function bluewhitered()

param m:

m

param white_number:

white_number

returns:

newmap

BLUEWHITERED Blue, white, and red color map.

BLUEWHITERED(M) returns an M-by-3 matrix containing a blue to white to red colormap, with white corresponding to the CAXIS value closest to zero. This colormap is most useful for images and surface plots with positive and negative values. BLUEWHITERED, by itself, is the same length as the current colormap.

plots.util.modify_suffix(inputCell)

Function modify_suffix()

Parameters:

inputCell – inputCell

Returns:

inputCell