GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - plotly/plotly_matlab: Plotly Graphing Library for MATLAB®

BranchesTags
Open more actions menu

Latest commit

 

History

1,698 Commits
1,698 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
plotly
plotly
 
 
.gitignore
.gitignore
 
 
CODE_OF_CONDUCT.md
CODE_OF_CONDUCT.md
 
 
CONTRIBUTING.md
CONTRIBUTING.md
 
 
LICENSE
LICENSE
 
 
README.md
README.md
 
 
plotlysetup_offline.m
plotlysetup_offline.m
 
 
plotlysetup_online.m
plotlysetup_online.m
 
 
sample_plot.png
sample_plot.png
 
 

Repository files navigation

Plotly Graphing Library for MATLAB® and GNU Octave

CI Release

Create interactive, web-based charts in your browser from MATLAB® and GNU Octave.

Maintained by the Plotly Community

Version: 3.1.0

MATLAB is a registered trademark of The MathWorks, Inc.

Features

  • Convert native MATLAB and GNU Octave figures to interactive Plotly charts with a single line of code
  • Fully offline: charts render locally in your browser — plotly.js is downloaded once during setup and cached on your machine
  • Publication-quality static export (PNG, JPEG, PDF, SVG) via the Kaleido runtime (downloaded once during setup)
  • Comparison gallery generator (makegallery) showing native and converted figures side by side

Install

Download the latest version of the wrapper:

  • github.com/plotly/plotly_matlab/archive/master.zip

Then, from the extracted folder, run:

plotlysetup_offline()   % one-time setup: downloads and caches plotly.js for offline usage (requires internet once)

This works in both MATLAB and GNU Octave.

Usage

Convert your MATLAB® or Octave figure into an interactive Plotly chart with a single line of code:

% Create some data for the two curves to be plotted
x  = 0:0.01:20;
y1 = 200*exp(-0.05*x).*sin(x);
y2 = 0.8*exp(-0.5*x).*sin(10*x);

% Create a plot with 2 y axes using the plotyy function
figure;
[ax, h1, h2] = plotyy(x, y1, x, y2, 'plot');

% Add title and x axis label
xlabel('Time (s)');
title('Frequency Response');

% Use the axis handles to set the labels of the y axes
ylabel(ax(1), 'Low Frequency');
ylabel(ax(2), 'High Frequency');

%--PLOTLY--%
p = fig2plotly; % <-- converts the current figure to an interactive Plotly chart

Sample Plot

The resulting figure is an interactive web chart: pan, zoom, hover, and download from the plotly.js toolbar.

Static export

Export figures to publication-quality static images:

p = fig2plotly;
saveplotlyfig(p, 'testimage.svg')  % PNG, JPEG, PDF, and SVG supported

Online mode

Offline usage is the default and requires nothing. For online features — storing charts on the Plotly cloud, retrieving figures with getplotlyfig, and streaming — configure your Plotly credentials:

plotlysetup_online('your_username', 'your_api_key')

Retrieving figures

Fetch figures stored on the Plotly cloud:

p = getplotlyfig('chris', 1638)  % downloads the graph data

Gallery

Generate a side-by-side comparison of native and converted figures for over 80 plot types:

makegallery('OutputFolder', 'gallery')

Documentation

  • plotly.com/matlab - official documentation

Questions & troubleshooting

Ask on the Plotly Community Forum.

Contribute

Please do! This is an open source project. Check out the issues or open a PR!

We want to encourage a warm, welcoming, and safe environment for contributing to this project. See the code of conduct for more information.

The test suite (plotly/testing/runplotlytests.m) runs in both MATLAB and GNU Octave and is executed on every push via GitHub Actions.

License

MIT © Plotly, Inc.

About

Plotly Graphing Library for MATLAB®

plot.ly/matlab/

Topics

d3d3jsdata-sciencedata-visualizationmatlabplotlytechnical-computingwebgl

Resources

Readme
MIT license

Code of conduct

Code of conduct

Contributing

Contributing
Activity
Custom properties

Stars

416 stars

Watchers

63 watching

Forks

166 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.