Skip to content
프로젝트

소개

Gramm은 Matlab을 위한 종합 데이터 시각화 도구 상자입니다. 사용하기 쉬운 고수준 인터페이스를 제공하여 복잡한 데이터를 다양한 통계 시각화 방식으로 출판물 수준의 플롯으로 만들 수 있습니다. Gramm은 R의 ggplot2 라이브러리에서 영감을 받았습니다.

데이터 및 분석

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
0
in 15 days
-1
in 1 month
기록 수집 중

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

gramm

Website View gramm on File Exchange Paper

Gramm is a MATLAB toolbox that enables the rapid creation of complex, publication-quality figures. Its design philosophy focuses on a declarative approach, where users specify the desired end result, as opposed to the traditional imperative method involving for loops, if/else statements, etc.

The MATLAB implementation of gramm is inspired by the "grammar of graphics" principles (Wilkinson 1999) and the ggplot2 library for R by Hadley Wickham. As a reference to this inspiration, gramm stands for GRAMmar of graphics for MATLAB. A similar library called Seaborn also exists for Python.

Getting started Custom layouts Groups and subgroups Bar charts Stacked bars Violin plots Swarm plots Distributions 2D distributions Curve fits Time series Polar plots

More in the examples gallery.

Installation

We recommend installing gramm directly through MATLAB's Add-ons explorer. Search for "gramm" and click Add! You can also install gramm manually by downloading the latest .mltbx file or by adding the gramm folder from the repository to your path.

Gramm 4 requires MATLAB R2022b or later; older releases of gramm work in older MATLAB versions. Some methods require the Statistics and Machine Learning Toolbox or the Curve Fitting Toolbox, see the cheat sheet.

Usage

This figure, made with the carbig dataset, shows the evolution of fuel economy of new cars with time, depending on the number of cylinders indicated by color, and regions of origin separated across subplot columns:

Fuel economy of new cars, made with the code below
load example_data.mat % Load example dataset about cars

% Provide the data: x (year of production) and y (fuel economy), color
% grouping data (number of cylinders), and a subset (even numbers of cylinders)
g=gramm('x',cars.Model_Year,'y',cars.MPG,'color',cars.Cylinders,...
    'subset',~mod(cars.Cylinders,2));
% Subdivide the data in subplots horizontally by region of origin
g.facet_grid([],cars.Origin_Region);
% Add graphical layers: raw data as points, and linear fits
g.geom_point("dodge",0.5);
g.stat_glm();
% Set names for legends and a figure title
g.set_names('column','Origin', 'x','Year of production', 'y','Fuel economy (MPG)',...
    'color','# Cylinders');
g.set_title('Fuel economy of new cars between 1970 and 1982');
% Draw the figure: gramm takes care of colors, subplots, legends and axes limits
g.draw();

Learning gramm

Live scripts going through the analysis of a dataset (open them in MATLAB to benefit from interactive elements; in MATLAB Online, add the gramm folder to the path first):

The examples gallery has one page per gramm feature, from basic use to advanced customizations, and the cheat sheet lists all methods with their options. Once gramm is installed, the same documentation is in MATLAB's help browser (doc gramm).

Citing gramm

Gramm has been published in the Journal of Open Source Software. If you use gramm plots in a publication you can cite it using the following:

Morel, (2018). Gramm: grammar of graphics plotting in Matlab. Journal of Open Source Software, 3(23), 568, https://doi.org/10.21105/joss.00568

Acknowledgements

gramm was inspired by ggplot2 and uses code or colormaps from Panda, colorbrewer2 and viridis.

관련 프로젝트 살펴보기

불러오는 중…