List of commits:
Subject Hash Author Date (UTC)
Extend plot_cuts to work with 1-dimensional (vector) meta_evs 3d7fd42b341f66e0d7e6733a4817c53c61f04863 Jason Hoelscher-Obermaier 2017-05-02 10:32:20
Add convenience fcts for plotting: logticks and set_tick_format fff9d4f483232a9377c5fdb4686f1ba1f5b48921 Jason Hoelscher-Obermaier 2017-05-02 10:28:50
Add support for automatic legends to plot_logneg_versus_gamma.m f10bdf863978f2c19acf73ca726de0855d16f9f0 Jason Hoelscher-Obermaier 2017-05-02 09:53:51
Add option to plot to subplots to plot_cuts and plot_logneg_versus_gamma 7037df1212f6ba94e74311c7fcdc1ffde453063d Jason Hoelscher-Obermaier 2017-05-02 09:21:31
Add option 'data_label' to plotLogneg.m 4f37d32ba0720a04e967125d8f02ade1239b27f9 Jason Hoelscher-Obermaier 2017-05-02 09:20:11
Add convenience function save_fig_pdf d482934c055e8805409c96f592ac18dd448ad8f9 Jason Hoelscher-Obermaier 2017-04-28 16:43:02
Add better helper fct plot_matrix for convenient display of correlation matrices etc 6f74f026d6477fd24083046842647ab750c185d7 Jason Hoelscher-Obermaier 2017-04-27 13:35:59
Add option 'shorteng' for legend-formatting in plot_cuts.m 7086bd95820d452f6caa8307b7176d99493dc0dc Jason Hoelscher-Obermaier 2017-04-26 09:54:51
Adapt .editorconfig to work with tsv-files e14c3c5c4898b939ca0a31abbaf35776fd6fc9d0 Jason Hoelscher-Obermaier 2017-04-26 09:28:44
Add functions to estimate autocorrelation times 8ca22e2b543094e742a49d9df6179d0eec49885a Jason Hoelscher-Obermaier 2017-04-23 07:49:59
Add convenience method for_each_evaluation_transform cfcc7a3041f9e7311cf643e686f4a5cae87319ae Jason Hoelscher-Obermaier 2017-04-21 09:57:26
Add convenience method for_each_evaluation_do to meta_ev.m a2b1592e908843ab6b0575f9b8438480c0941ec9 Jason Hoelscher-Obermaier 2017-04-21 09:36:09
Add option 'linestyle' to plotLogneg.m and plot_logneg_versus_gamma.m ed991ec181defd2ab4d68dab96da9aa115608a0e Jason Hoelscher-Obermaier 2017-04-19 09:25:14
Add convenience-fct row_wise_generator.m d6c089c823e10db53d16255040043b520b2f3d02 Jason Hoelscher-Obermaier 2017-04-19 08:40:06
Move show_plot to daughter class dual_homo_measurement 9429e3564bd7d9ee39be7b9984cb1191d3bb565e Jason Hoelscher-Obermaier 2017-04-18 08:01:56
Allow to specify which traces to plot in show_plot (used e.g. by show_NPS) e59a8b7ac08d2f8d0f2b6535d764b8e3bf9e5a55 Jason Hoelscher-Obermaier 2017-04-18 07:59:45
Add options to plot_cuts: wrap legend title, switch number format in legend 6b4df721198584fe4a0f24d64f6666a2c319845c Jason Hoelscher-Obermaier 2017-04-18 07:54:22
Add support for parallel computation to run_simulation_evaluation_direct.m 79e020013e744be9353a48c49998345533218007 Jason Hoelscher-Obermaier 2017-04-13 15:15:07
Speed up calculation of entanglement from simulation streams. 4fe4db313d502c3694cfcf6770b41387afdbbc19 Jason Hoelscher-Obermaier 2017-04-12 13:06:31
Fix inconsistent code style in repo (only *.m-files) 1a87b28a285ad84af1836154f80761430554700c Jason Hoelscher-Obermaier 2017-04-12 10:36:03
Commit 3d7fd42b341f66e0d7e6733a4817c53c61f04863 - Extend plot_cuts to work with 1-dimensional (vector) meta_evs
Author: Jason Hoelscher-Obermaier
Author date (UTC): 2017-05-02 10:32
Committer name: Jason Hoelscher-Obermaier
Committer date (UTC): 2017-05-02 11:24
Parent(s): fff9d4f483232a9377c5fdb4686f1ba1f5b48921
Signing key:
Tree: f3f9da09f999435f4e2a72c71b4f3f6d820104db
File Lines added Lines deleted
data_analysis/@meta_ev/plot_cuts.m 35 8
File data_analysis/@meta_ev/plot_cuts.m changed (mode: 100644) (index 1a869a2..bf8e0d0)
1 function plot_cuts(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
2 assertEqual(meta.gridtype,'matrix',...
3 'only implemented for gridtype "matrix"')
1 function plot_cuts(meta, plot_type, tracepairs_ind, varargin)
2 switch meta.gridtype
3 case 'vector'
4 par_ind = 2;
5 par_vals = 'all';
6 args = {par_ind, par_vals, varargin{:}};
7 case 'matrix'
8 args = {varargin{:}};
9 otherwise
10 error('"plot_cuts" is only implemented for gridtypes "matrix" or "vector".')
11 end
12 plot_cuts_matrix(meta, plot_type, tracepairs_ind, args{:});
13
14
15 function plot_cuts_matrix(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
16 % assertEqual(meta.gridtype,'matrix',...
17 % 'only implemented for gridtype "matrix"')
4 18 if isequal(par_vals, 'all') if isequal(par_vals, 'all')
5 19 meta_filtered = meta.copy; meta_filtered = meta.copy;
6 20 else else
 
... ... function plot_cuts(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
33 47 legend_title_maxlength = inf; legend_title_maxlength = inf;
34 48 linewidth = 1.5; linewidth = 1.5;
35 49 subplotnum = 111; subplotnum = 111;
50 show_zero = false;
36 51 for k=1:2:length(varargin) for k=1:2:length(varargin)
37 52 switch lower(varargin{k}) switch lower(varargin{k})
38 53 case {'x_scale','xscale'} case {'x_scale','xscale'}
 
... ... function plot_cuts(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
47 62 y_scale = varargin{k+1}; y_scale = varargin{k+1};
48 63 case {'y_lims','ylims','y_lim','ylim'} case {'y_lims','ylims','y_lim','ylim'}
49 64 y_lims = varargin{k+1}; y_lims = varargin{k+1};
65 case {'show_zero', 'showzero'}
66 show_zero = varargin{k+1};
50 67 case {'figure','fig'} case {'figure','fig'}
51 68 fig = varargin{k+1}; fig = varargin{k+1};
52 69 case {'subplot'} case {'subplot'}
53 70 subplotnum = varargin{k+1}; subplotnum = varargin{k+1};
54 71 case {'label','fig_label','figlabel'} case {'label','fig_label','figlabel'}
55 72 meta.fig_label = varargin{k+1}; meta.fig_label = varargin{k+1};
56 case {'colororder', 'color_order', 'colors'}
73 case {'colororder', 'color_order', 'colors', 'color'}
57 74 colororder = varargin{k+1}; colororder = varargin{k+1};
58 75 case {'legend_postfix','legendpostfix'} case {'legend_postfix','legendpostfix'}
59 76 legend_postfix = varargin{k+1}; legend_postfix = varargin{k+1};
 
... ... function plot_cuts(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
102 119 else else
103 120 legend_parser = @(num) [legend_number_parser(num), ' (', legend_postfix,')']; legend_parser = @(num) [legend_number_parser(num), ' (', legend_postfix,')'];
104 121 end end
105 cut_labels = arrayfun(legend_parser, unique(meta_filtered.params{par_ind}),...
106 'UniformOutput', false);
122 switch meta.gridtype
123 case 'vector'
124 cut_labels = sentence_case(meta.meta_label);
125 case 'matrix'
126 cut_labels = arrayfun(legend_parser, unique(meta_filtered.params{par_ind}),...
127 'UniformOutput', false);
128 end
107 129 plot(x_data, y_data, linestyle, 'LineWidth', linewidth, 'DisplayName', cut_labels); plot(x_data, y_data, linestyle, 'LineWidth', linewidth, 'DisplayName', cut_labels);
108 130 labels(meta_filtered.param_names{x_ind},display_name); labels(meta_filtered.param_names{x_ind},display_name);
109 131 set(gca, 'xscale', x_scale, 'yscale', y_scale) set(gca, 'xscale', x_scale, 'yscale', y_scale)
110 132 meta_ev.xylims(x_lims, y_lims); meta_ev.xylims(x_lims, y_lims);
111 133 leg = legend('Location', legend_location); leg = legend('Location', legend_location);
112 134 legtitle = get(leg,'title'); legtitle = get(leg,'title');
113 title_str = sentence_case(meta_filtered.param_names{par_ind});
135 switch meta.gridtype
136 case 'matrix'
137 title_str = sentence_case(meta_filtered.param_names{par_ind});
138 otherwise
139 title_str = '';
140 end
114 141 if ~(legend_title_maxlength==inf) if ~(legend_title_maxlength==inf)
115 142 title_str = linewrap(title_str, legend_title_maxlength); title_str = linewrap(title_str, legend_title_maxlength);
116 143 end end
 
... ... function plot_cuts(meta, plot_type, tracepairs_ind, par_ind, par_vals, varargin)
120 147 'LineWidth', 1, 'Interpreter', 'latex','FontSize',11); 'LineWidth', 1, 'Interpreter', 'latex','FontSize',11);
121 148
122 149 meta.my_postprocess_plot(meta.(fig_handle)); meta.my_postprocess_plot(meta.(fig_handle));
123 if isequal(display_name, 'Max. log. negativity')
150 if show_zero
124 151 hline=refline(0,0); set(hline, 'Color', 'k', 'DisplayName',' '); hline=refline(0,0); set(hline, 'Color', 'k', 'DisplayName',' ');
125 152 end end
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/gutc61/Membrane

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/gutc61/Membrane

Clone this repository using git:
git clone git://git.rocketgit.com/user/gutc61/Membrane

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main