Subject | Hash | Author | Date (UTC) |
---|---|---|---|
Add options for colorbar position and data label background color to plot_matrix | 261a772c66212e9b82d9125cfb059565dae41fba | Jason Hoelscher-Obermaier | 2017-05-22 17:35:34 |
Add fct set_legend_title | be01bc463524c4943a3268b349f6a524a62c64f3 | Jason Hoelscher-Obermaier | 2017-05-16 13:34:19 |
Allow to set interpreter and fontsize in labels.m | 24f21770d074737ed0b9d7e879cff39ee3f9fd63 | Jason Hoelscher-Obermaier | 2017-05-16 13:32:24 |
Attempt to open generated pdf in save_fig_pdf | bcf7b91a892bc3cd6f1da5202cfff0825d3ba406 | Jason Hoelscher-Obermaier | 2017-05-16 13:30:56 |
Add hackish workaround for problems with wrong fontsize when exporting figures | e977df7ea63dfb64d14244db41dcbdf34832fbe9 | Jason Hoelscher-Obermaier | 2017-05-13 12:18:19 |
Add option 'show_physicality' to plot_logneg_versus_gamma.m (class meta_ev) | 33dba0173e7d446c08ab89b7f0d5bd7c00f6755d | Jason Hoelscher-Obermaier | 2017-05-13 12:02:12 |
Set default font size for legends and labels to 11 | 4f9be2e429605dd90ab6b1eabb88fea12c7e9ddb | Jason Hoelscher-Obermaier | 2017-05-13 12:01:05 |
Remove figure.m to avoid MATLAB warnings | 3c8e854f1e48d28df090753f615e5e1028259531 | Jason Hoelscher-Obermaier | 2017-05-13 11:57:42 |
Copy generated png to clipboard autom.ly in save_fig_pdf | 70897f3af36723888e59ae3421545d96d67db302 | Jason Hoelscher-Obermaier | 2017-05-10 10:18:00 |
Add option to hide legend entries for 'Physicality' to plotLogneg | db263de99d27a86255cd724b06208c1cae93bd76 | Jason Hoelscher-Obermaier | 2017-05-10 10:17:12 |
Fix bug: surround arguments to 'system' by double quotes | dffc09c758a8f55fb8dc2a4ddf68c8593be46a3d | Jason Hoelscher-Obermaier | 2017-05-09 10:24:55 |
Add property max_physical_logneg to entanglement_evaluation | 865055eadb8c4b035321b2359b69dad4f48e33ec | Jason Hoelscher-Obermaier | 2017-05-08 09:37:40 |
Add option 'only_physical' to plotLogneg and plot_logneg_versus_gama | a5510a09ab9ecb8239aef3853867884aefb28e3b | Jason Hoelscher-Obermaier | 2017-05-07 09:47:52 |
Add option 'two_sidebands' to trace_out | 3f70b4498e116bf89ea2230e4a6b081d8d240bc3 | Jason Hoelscher-Obermaier | 2017-05-07 08:14:45 |
Fix bug in meta_ev | 25d2497bf41eaf1198d88269dd3460812b38e18f | Jason Hoelscher-Obermaier | 2017-05-05 17:45:20 |
Allow plotting of abs. values with log. color scale in plot_CM | 2147950f70bb2631656c1c20448eeda106acf6e2 | Jason Hoelscher-Obermaier | 2017-05-05 16:15:26 |
Improve plotLogneg | 445bec4d79ec7c09efa92a878e9fc9d5b3a6801e | Jason Hoelscher-Obermaier | 2017-05-05 15:26:31 |
Add method plot_CM to entanglement_evaluation | 54f9ca5aa51e96aedf3dddaa1609438c088a87b8 | Jason Hoelscher-Obermaier | 2017-05-05 14:29:23 |
Add option 'color_range' to plot_matrix | 7ae27bc20af3faf8947ac07eec66b52851c45f54 | Jason Hoelscher-Obermaier | 2017-05-05 13:57:06 |
Improve convenience function plot_matrix | 8ebc93c933416a384bc4c6b0ab44a8f6f516b695 | Jason Hoelscher-Obermaier | 2017-05-05 10:07:33 |
File | Lines added | Lines deleted |
---|---|---|
misc/plottools/plot_matrix.m | 12 | 2 |
File misc/plottools/plot_matrix.m changed (mode: 100644) (index d5effcd..e6c7445) | |||
... | ... | function plot_matrix(mat, varargin) | |
9 | 9 | y_length = size(mat,1); | y_length = size(mat,1); |
10 | 10 | labels = repmat({''},1, x_length); | labels = repmat({''},1, x_length); |
11 | 11 | show_colorbar = false; | show_colorbar = false; |
12 | colorbar_location = 'EastOutside'; | ||
12 | 13 | show_numbers = true; | show_numbers = true; |
13 | 14 | formatter = @(num)num2str(num,'%0.1f'); | formatter = @(num)num2str(num,'%0.1f'); |
14 | 15 | xlabel_rotation = 0; | xlabel_rotation = 0; |
15 | 16 | show_xlabels = true; | show_xlabels = true; |
17 | number_background = []; | ||
16 | 18 | for k=1:2:length(varargin) | for k=1:2:length(varargin) |
17 | 19 | switch lower(varargin{k}) | switch lower(varargin{k}) |
18 | 20 | case {'labels'} | case {'labels'} |
... | ... | function plot_matrix(mat, varargin) | |
43 | 45 | triangular = varargin{k+1}; % if true plot only lower triangular part. | triangular = varargin{k+1}; % if true plot only lower triangular part. |
44 | 46 | case {'colorbar', 'color_bar'} | case {'colorbar', 'color_bar'} |
45 | 47 | show_colorbar = varargin{k+1}; | show_colorbar = varargin{k+1}; |
48 | case {'colorbarlocation', 'colorbar_location', 'color_bar_location'} | ||
49 | colorbar_location = varargin{k+1}; | ||
50 | case {'numberbackground', 'number_background'} | ||
51 | number_background = varargin{k+1}; | ||
46 | 52 | otherwise | otherwise |
47 | 53 | error(['Unrecognized varargin-argument ', varargin{k}]); | error(['Unrecognized varargin-argument ', varargin{k}]); |
48 | 54 | end | end |
... | ... | function plot_matrix(mat, varargin) | |
57 | 63 | imagesc(mat); | imagesc(mat); |
58 | 64 | colormap(cmap); | colormap(cmap); |
59 | 65 | caxis([color_min, color_max]); | caxis([color_min, color_max]); |
60 | if show_colorbar, colorbar; end | ||
66 | if show_colorbar, colorbar('Location', colorbar_location); end | ||
61 | 67 | ||
62 | 68 | % DATA LABELS | % DATA LABELS |
63 | 69 | if show_numbers | if show_numbers |
64 | 70 | % ADD DATA LABELS TO PLOT | % ADD DATA LABELS TO PLOT |
65 | 71 | [x,y] = meshgrid(1:x_length,1:y_length); %# Create x and y coordinates for the strings | [x,y] = meshgrid(1:x_length,1:y_length); %# Create x and y coordinates for the strings |
66 | hStrings = text(x(:),y(:),strvcat(data_labels{:}), 'HorizontalAlignment', 'center'); %# Plot the strings | ||
72 | text_options = {'HorizontalAlignment', 'center'}; | ||
73 | if ~isempty(number_background) | ||
74 | text_options = {text_options{:}, 'Background', number_background}; | ||
75 | end | ||
76 | hStrings = text(x(:),y(:),strvcat(data_labels{:}), text_options{:}); %# Plot the strings | ||
67 | 77 | ||
68 | 78 | % ADJUST TEXT COLOR OF DATA LABELS | % ADJUST TEXT COLOR OF DATA LABELS |
69 | 79 | graymap = mean(rgb2gray(cmap)')'; | graymap = mean(rgb2gray(cmap)')'; |