GithubHelp home page GithubHelp logo

masumhabib / plotpub Goto Github PK

View Code? Open in Web Editor NEW
276.0 276.0 90.0 3.11 MB

Publication quality plot in MATLAB.

Home Page: http://masumhabib.com/projects/publication-quality-graphs-matlab/plotpub-v2-0-documentation/

License: BSD 2-Clause "Simplified" License

MATLAB 100.00%

plotpub's People

Contributors

3a8r avatar charlesbaynham avatar chuntaolu avatar hsidky avatar masumhabib avatar mroddewig avatar nihilist77 avatar plzh avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

plotpub's Issues

Error Bars Problems

PlotPub doesn't seem to work well with errorbar when plotting multiple lines.
Doing plt = Plot() after first using errorbar (x,y,z) seems to work at first although it gives this warning:

Warning: Unable to get data from all axes: There is no ZData property on the ErrorBar class.

In Plot (line 324)

This doesn't seem to do anything severe until you try to change the plt.Markers values which cannot be changed past the first line ploitted and gives the error:

Index exceeds matrix dimensions.
Error in Plot/set.Markers (line 456)
X = self.xdata{ii};

Is there a way to get error bars to work with PlotPub. They are very important for many scientific publication figures.

fixPSlinestyle corrupts resulting eps

fixPSlinestyle corrupts resulting eps -> Preview.app can not read it (Mac OS X, Matlab 2014b).
Disabling function call makes pubPlot usable again.

Matlab crash while trying to export tiff image

Tried with the earlier hotfix & the latest code. It seems it always crashes for Windows 7 & 10. My Matlab version is R2014b. MWE is given below.

clear all; 

f = 50;  % frequency
Vm = 10; % peak
phi = 0; % phase

% generate the signal
t = [0:0.0001:3/f];
th = 2*pi*f*t;
v = Vm*sin(th+phi);

% plot it
figure;
plot(t*1E3, v);

plt=Plot();

plt.export('test.tiff');

Issue with Markers and Legends

I am seeing an issue when a legend is created with markers. Whenever a line includes a marker, the text in the legend corresponding to that line turns gray. I am using R2018a. The problem can be reproduced with:

% generate the signal
f = 50;  % frequency
Vm = 10; % peak
phi = 45; % phase
t = [0:0.0001:3/f];
th = 2*pi*f*t;
v1 = Vm*sin(th);
v2 = Vm*sin(th - phi);
v3 = Vm*sin(th - phi*2);

% plot them
plt = Plot(t*1E3, v1, t*1E3, v2, t*1E3, v3);

plt.LineStyle = {'-', '-', '-'}; % three line styles
plt.Markers = {'o', '', 's'};
plt.LegendBox = 'on';
plt.Legend = {'\theta = 0^o', '\theta = 45^o', '\theta = 90^o'}; % legends

subplot support

It will be highly convenient if it supports subplot. Please add this feature if feasible.

Bold font

is there any way to make font bold??

bar graph support

It will be highly convenient if it supports bar graph. Please add this feature if feasible. #

Save multiple files

Is it possible to make the function be able save multiple files with different format at a time?

Legends in a single line on top or bottom

I am using this to create my plots but I encountered a problem that I cannot place three legends in a single row. it is always in front of the graph which is difficult to read for reviewers.

please solve my issue I will be grateful.
Untitled

Thanks

Title option for Plot Pub

Hi,

  Thank you very much for such a useful library. Can you also please include a title option in PlotPub.

Thanks,
Vigil

Multiline axis label

it seems not to be possible to split axis label (either x or y) across multiple lines with command \n. Please add this feature if feasible.

Bug with LegendBox

I tried the code below with LegendBox 'on'

clear all;

f = 50;  % frequency
Vm = 10; % peak
phi = 0; % phase

% generate the signal
t = [0:0.0001:3/f];
th = 2*pi*f*t;
v = Vm*sin(th+phi);

figure;
plot(t*1E3, v);

plt = Plot();

plt.Legend={'some'};
plt.LegendBox='on';

Here the LegendBox interferes with the curve of the graph. I think it shouldn't. So for a workaround I added the line below.

plt.BoxDim=[6 5];

Now the upper portion of the figure goes outside of the monitor. So I had to reduce the size of the figure to get a hold. I tried this both with windows 7 & 8.1.

Empty page generated

Hi,
I am experiencing weird behaviour of PlotPub on Mac OS X 10.10.5, Matlab R2014b. I spent few hours trying to find out what is wrong but had no luck. I was however successful reconstructing observed behaviour with simple as possible example:

  1. Start Matlab -> native print() works OK
figure(1); clf;
plot(1:100);
print('-depsc2', 'test_print1.eps');

test_print1

  1. Use PlotPub (clone from master), empty file is generated :(
plt=Plot(1:100);
plt.export('test_plotPub.eps');

test_plotpub

  1. Once PlotPub had been invoked, print() stopped working properly :(
figure(1); clf;
plot(1:100);
print('-depsc2', 'test_print2.eps');

test_print2

Please see attached screens. Any idea how to fix this? or what am I doing wrong?
Thank you

Printing all properties

I missed a semicolon while plotting something. Due to that it printed all the properties of plt like this:
plotbug

Is there any way to prevent this from your side?

This can be generated with this code:

clear all;
clc;

f = 50;  % frequency
Vm = 10; % peak
phi = 0; % phase

% generate the signal
t = [0:0.0001:3/f];
th = 2*pi*f*t;
v = Vm*sin(th+phi);

figure;
plot(t*1E3, v);

plt = Plot();

plt.XLim = [0, 80];

plt.Legend={'some'}
plt.LegendBox='on';

Octave support

Is this supported on GNU octave? I am receiving an error when I call Plot( ).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.