Skip to content

Commit

Permalink
Refactoring to use class folder, better examples.m, ability to change…
Browse files Browse the repository at this point in the history
… grouping between layers

- Switched from a monolithic gramm.m file to a @gramm class folder with
separate files for all the methods
- examples.m is now a proper how-to, and gives good results with
matlab’s publish(). Published version is in the html folder
- With the update() methods, there is now a proper way to have
different groupings for different geom_ and stat_layers
- Support for categorical variables in facet_grid() and facet_wrap()
  • Loading branch information
piermorel committed Apr 26, 2016
1 parent 0ffbeb5 commit 07a65a6
Show file tree
Hide file tree
Showing 97 changed files with 6,976 additions and 5,479 deletions.
17 changes: 17 additions & 0 deletions @gramm/axe_property.m
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function obj=axe_property(obj,varargin)
% axe_property Add a matlab axes property to apply to all subplots
%
% Example syntax: gramm_object.axe_property('ylim',[0 1])
% Arguments are given as a name,value pairs. The accepted
% arguments are the same as in matlab's own set(gca,'propertyname',propertyvalue)

if mod(nargin-1,2)==0
for obj_ind=1:numel(obj)
for k=1:2:length(varargin)
obj(obj_ind).axe_properties=vertcat(obj(obj_ind).axe_properties,{varargin{k},varargin{k+1}});
end
end
else
error('Arguments of axe_property() must be given as ''name'',value pairs')
end
end
Loading

0 comments on commit 07a65a6

Please sign in to comment.