File Exchange

image thumbnail

plt

version 1.35 (15.5 MB) by Paul Mennen
A plot/plotyy alternative (data exploration optimized). A framework for GUI design with plots. Examples with a focus on signal processing.

20 Downloads

Updated 04 Nov 2020

View Version History

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

--- plt version 03Nov20 ---

Matlab users may be interested in this toolbox for its focus
in one or more of these three areas:

1. A plotting interface. An alternative to Matlab's plot and plotyy.

a. Like plot, plt commands can be typed at the command prompt.
For simple commands the interface is the same.
b. Optimized for data exploration with improved zooming, panning,
auto-scaling controls & cursor movement with delta, rms, mean,
y/x, and magnitude readouts.
c. Workspace plotting (interactively select variables to plot)
d. Automatically generated legend (also used for trace selection).
e. Up to 999 traces on a single or dual (left/right) axis.
(Limited to 99 traces if a legend is required.)
f. Supports subplots, each with individual cursor control & readout.
g. Peak/Valley finder, display expansion history, and metric prefixes.
h. Better looking grid lines with selectable color and style.
i. Interactive editing of trace properties, colors, and annotations.
j. Mouse and keyboard driven data editing.
k. A consistent and flexible command line interface, all explained
in a single help file with example code for every important option.
No longer will you have to hunt for obscure handle graphics
commands scattered throughout the Matlab documentation.
l. Includes 34 example programs demonstrating various plt features and
to give you ideas for designing your own graphical interfaces. Also
includes demoplt, a program allowing you to view all these example
programs so you can quickly evaluate and test plt's capabilities.
m. Regular updates based suggestions from users.

2. A GUI building framework (usually involving 2D or 3D plotting)

a. An alternative to Matlab's App designer or Guide.
b. Provides a collection of pseudo objects and auxiliary functions
tailored to simplify your GUI designs.
c. The capability to move and resize the pseudo objects and native
Matlab objects while recording the positions so that they can be
made permanent.
d. A methodology for combining these elements presented with a series
of example programs.

3. Signal Processing
For 15 out of the 34 included example programs, in addition to their
role in demonstrating various plt features were also designed to have
an educational value in these signal processing topics:

- afilt.m (classical analog filters)
- bounce.m (random walks)
- curves.m (classic plane curves)
- dice3.m (Monte Carlo simulation)
- editz.m (z-plane analysis)
- gauss.m (summation of random variables)
- gpsLog.m (GPS data analysis & simulation)
- julia.m (Mandelbrot & Julia set fractals)
- pltquiv.m (Hermite polynomial interpolation)
- pltmap.m (2-dimensional cubic interpolation)
- square.m (synthesis of harmonic functions)
- tas.m (aircraft peformance modeling)
- weight.m (classic sound level weighting curves)
- wfall.m (clipping distortion effects)
- winplt.m (fft windowing)

This toolbox has been verified under all Matlab releases from 12.1
(ver 6.1) to R2020b using all Windows versions from XP to Windows 10.
Brief testing has also been done under the Mac and other Unix platforms.

Cite As

Paul Mennen (2021). plt (https://www.mathworks.com/matlabcentral/fileexchange/4936-plt), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (82)

Paul Mennen

Thanks Kevin for your feedback. The error you got (line 684) was because some parameters I claimed were optional were actually required. However in my latest release (a few days ago) I fixed that problem and those parameters are again optional. Your code indicates you didn't fully understand how to use the image pseudo object, so I added another example program (drawgray.m) to the release which is very simple (10 lines) and will help you understand how to use plt to display intensity maps. As far as your editing need, there was no editing capability provided for intensity maps in the release you were using. However I have added this capability in the 03Nov20 release, so I would suggest trying the new release. If plt still doesn't fulfill the needs, let me know more about your application and perhaps I can think of some ideas for you or perhaps add more plt enhancements to help out. ~Paul

Kevin Cutler

This looks amazing. I'd love to use this to build a GUI to make training data for instance segmentation on bacterial microscopy images as well as explore cell traces (fluorescence, morphology, etc). I'm starting off with just plotting an image:

x = size(im,2);
y = size(im,1);
plt(0,0,x,y,'Options','Ticks');
h = plt('image',1,1:x,1:y,im)

It plots but gives an error:
Unrecognized function or variable 'hm'.
Error in plt (line 684)
set(hm,'tag',['mid' imgS]); set(he,'tag',['edge' imgS]);

I'll spend some more time digging into the code here, but I'm guessing it is an error on my part and there is a better way to display an image. I'm on R2020a btw.

Eventually I need to edit an overlaid binary mask. Looks like pltmap and editz are the best examples to look at, though I'm worried it will be difficult to obtain a sort of 'drawing' cursor because the default behavior is to move the plotting region. Any suggestions would be much appreciated.

Paul Mennen

Thanks Boris for the 5 star rating. In answer to your question ... yes, you can start plt with no traces and add the traces later with pltt. Just start plt with plt('+',12) which will allow you to add up to 12 traces. Of course, if you need more or less than that, just change the 12 to the max you will need. Also, you can include any other parameters in the argument list such as figure name, axes labels and limits, etc. Right now pltt can only add traces but I just made a change that will allow it to remove traces as well and I expect to put up a new release in a few days with that change. Also despite reporting in an early comment that plt works in R2020a I found that the testing was inadequate and it doesn't really work. (Surprising that TMW didn't warn of the incompatibility with older code in the release notes.) Anyway, the new release will take care of that problem as well. ~Paul

Boris

Amazing tool! Thank you very much Paul.

Is it possible to remove traces (opposite to adding traces using pltt command)?
Is it possible to run plt without any trace?

I would like to build a GUI with blank axes and allow the user to add/remove traces.

Paul Mennen

Hi Rodrigo. The newest I was able to test with was R2019a, but I just had a friend download the latest plt toolbox and he tested it with both R2019b and R2020a and reported that it worked well. Sorry it crashed on you ... I haven't seen the error you reported before. With a few simple experiments, I'm sure we could figure out what the problem is, but this comment section isn't appropriate for that. Would you be able to send me an email? (My email address is on the toolbox description, and at the top of most every .m file. Also if you type "plt help" you will see my email at the bottom of the introduction page and it's the first thing that appears when you type "help plt" as well. I hope to hear from you! ~Paul

Rodrigo Duran

Just downloaded it and I get this when I first tested it on R2020a:

>> plt(rand(1,100),rand(1,100))
Error using matlab.ui.Figure/set
Error setting property 'Position' of class 'Figure':
Width and height must be greater than or equal to 0
Error in pltinit (line 800)
else set(FIG,'pos',posFIG,'Name',FigName,'color',cFIGbk);
Error in plt (line 4660)
otherwise, [Ret1 Ret2] = pltinit(varargin{:});

JE

Daniel Vieira

I see it can edit data with the mouse, but it seems to only work in 2D. can this toolbox be used to drag the vertices of a patch with the mouse? if not, how easy/hard would it be to adapt it?

cands

Thank you very much Paul for making this excellent plotting tool!

Esolomo

Thanks Paul, what a great job done on this plt. It's a life saver for me immediately i came across it.

Esolomo

Paul Mennen

Hi Bei Liu. I would rather reply to you directly, but since you didn't supply your email address I guess I will have to do this here. Suppose you want to change all the lines of the plot to 33% transparency. Follow the call to plt with these 3 lines:

-----------------
trans33 = @(x) [x .33];
L = getappdata(gcf,'Lhandles');
set(L,{'color'},
cellfun(trans33,get(L,'color'),
'UniformOutput',0))
------------------

Actually you should call plt with L as the return value, then you would not need the getappdata line above. Also this trick works with plot as well as with plt. This only works with very recent versions of matlab (R2015a or later). ~Paul

bei liu

Great job! Many thanks, Paul! I wonder if there is any way to set the transparency of line plot?

Paul Martin

Paul Mennin has done us a great service with this submission. The plt package is a huge advance on the standard plot functions, especially for visualising and exploring large data sets: it simply runs rings around the standard functions. I've been using it to explore sets of 20 curves with each 5K-30K data points, which it handles with grace and ease. And the developer is friendly responsive and expert.

In my opinion the Matlab engineers would benefit from a serious look at how some of the features implemented here could go into the main release plot function.

Top marks from me!

Christian Butcher

In addition to the usefulness of plt's plotting tools, the quality of documentation is very high, and the demo files are generously commented.

The author also is helpful when responding to requests for aid, as can be readily seen in this comment thread!

Jakub Kozlowski

Extremely efficient tool with diverse applications. Clarity of plt-designed interface unmatched by any other set of functions. Props to Paul!

Vadim Baines-Jones

Paul Mennen

Sorry RamblinWreck. Those toolboxes somehow where checked by default when I submitted the file. Actually no toolboxes are required - just plain old Matlab (any version).

RamblinWreck

This looks like an outstanding package ! Is the signal processing toolbox required to access the basic plot commands of this tool ?

danimp

This plotting tool is an absolute must for dual axis plots. Far superior to plotyy. I'm a mechanical engineer who primarily works with other mechanical engineers, and this tool never fails to impress those who haven't seen it before. Additionally, Paul is generous with his time to answer questions from the users of plt, which I've personally taken advantage of and greatly appreciate.

This tool is well-worth your time to download and try out.

JRMel

Is there a way to have two y axes with different scales on the same plot?

Paul Mennen

Hi Barry. I think the comment section is more for comments to the user community and not for sendinng questions to the author. An email would be more appropriate and I can give you a more complete answer that way. (My email address is at the top of the help file.) A short answer to your question however is - yes, plt can create its axis inside an existing figure. You do this with the 'Fig' argument, described in the section called "Labels and Figure Properties".

Barry

I'm just exploring what plt can do - it looks like it gives a lot of flexibility. I have an already-built gui that I'd like to improve the plot portion of. Can I integrate a plt figure into my existing gui easily? Right now, a use a plotting function that puts the plot into an axes box in the gui.

Otavio

Thank you for this amazing function. A lot of time saved using it.

Alexander Klein

Paul Mennen

Everytime I answer a support type question in the ratings section I suggest that email would be a better place to handle it, yet most people ignore this for some reason. Anyway ... to answer your question - you don't need "hold on" for doing this. Just combine your two plt statements into one. i.e. -

plt(x,[y1;y2],e1,e2)

- Also I suggest that you should look thru some of the examples in the demo folder since nearly every one does this kind of thing. Perhaps start with pltvbar.m since it also plots error bars as you are doing.
~Paul

gargouri

hello
I need to use hold on
to plot on in the same time the Y function and the error bar (like errorbar in matlab)

e1=ebar(.....)
e2=ebar(.....)
plt(x, [y1;y2])
plt (e1,e2)

thanks :)

Paul Mennen

Esmond - cluttering the file exchange ratings section with support questions is not necessary since my email address appears when you type "help plt" as well as in the intro section of the full help file (type "plt help"). But in answer to your question, look at the demo program "pltvbar.m" which plots multiple line and bar charts. That particular demo doesn't use the right hand axis as you wish to do, although most of the other demos do. In short, you specify which traces are to appear on the right axis with the 'right' parameter - e.g. 'right',[2 5 6] would instruct plt to put trace numbers 2,5,6 on the right axis and to put all other traces on the left axis. I hope this helps. Email me if you have further questions. ~Paul

Esmond

This looks excellent. I want to plot multiple line plots to the left axis, and multiple bar charts to the right axis, is it possible to add bars using this program? I can't see how if so.

Mathieu NOE

I've been using plt for a while and found it very superior to any other ploting function.
Also Paul was very quick to answer my request - how to rotate the XTick labels when using plt; For the time being, this is not yet implemented, but you can use plt in conjunction with xticklabel_rotate.m as explained hereafter by Paul Mennen himself :

%%%%%%%%%%

I haven't had anybody request rotated x ticks so this feature is not built into plt.
Perhaps I will do that at some point, but for now I think it is possible to use xticklabel_rotate.m.
The main problem is that that routine does not use the 'xcolor' axis property (as I think it should) but you can force it to. For example try this:

>> plt50;
>> set(xticklabel_rotate,'color',get(gca,'xcolor'));

plt50 is one of the demo programs included in the plt demo folder.
The reason this one works so easily is because plt50 uses only the left hand axis.
A program that uses both left and right hand axes will be a bit more complicated since xticklabel_rotate modifies the size of the left hand axis but does nothing about the right hand axis. But this also can be fixed.
For instance, the example program pltn uses both left and right axes, so try it like this:

>> pltn;

>> set(xticklabel_rotate,'color',get(gca,'xcolor'));
>> ax = getappdata(gcf,'axis');
>> set(ax(2),'position',get(ax(1),'position'));

The 3rd line gets the handles of the left/right axis respectively, and the 4th line sets the position of the right axis to be the same as the left axis.

This method will be fine if you just want to rotate the ticks inside a program.
If you want to do it interactively, it would be best to create a new xticklabel rotation routine that calls your current one with the extra bits to fix things up. For instance the 4th line above could be changed to:

if length(ax)==2 set(ax(2),'position',get(ax(1),'position')); end;

That way it would work no matter whether the right hand axis was used or not.
If this is beyond your programming experience, I can help you out with such a routine.

There might be other special cases you would have to consider ... for example something that used plt's subplot capability might not work right away with xtick rotate. (Although most users do not use the subplot feature.)

~Paul
%%%%%%%%%%

Mathias

I found this file after getting fed up with Matlabs plotyy. And I must admit it took a little while to understand since it has so many options but I've found it to be vastly superior to plotyy! If you need to make dual y-axis plots I can only recommend you use the time it takes to learn this command instead.

Paul Mennen

Andreas - Most everyone prefers to use the dotted grid style so I didn't put an explicit option in for that. However after the call to plt you can change the grid to solid with the following command:

set(findobj(gcf,'user','grid'),'LineStyle','-')

Jeff - There is a way to force plt to do something like hold on/off but its messy and I wouldn't recommend it since it is so different from the work flow that I imagined for plt. Perhaps you could let me know what exactly you are trying to plot and I probably can suggest the best way for you to use plt to accomplish that. Also you might peruse the various demo programs for ideas on how best to use plt.

Christine - I'm not sure I understand your question exactly. Perhaps its just that you want to know what a color such as [x y z] looks like? If that's the question, the answer is pretty simple. The 3 numbers are the amount of Red, Green, and Blue in the selected color. (The numbers must be between 0 and 1. Plenty about that in the matlab documentation.) Here is a good way to see what any color selection will look like: In any plot created with plt, enable the menu bar by clicking on the "Menu" tag, then select the last menu ("Color/Lines"). Then select "Edit line". Then in the new figure that appears, RIGHT click on the 3 numbers below the line properties color popup. This will open the color pick window which initially will show you a palette of 256 colors possible with red=0. To see the palette with some other value of red, just move the red slider. Or move the green slider to force that amount of green and see a palette of colors that results. (Same for the blue slider of course). I hope that helps.

Andreas

Looks and works great. However I can't find out how to change the grid line style from dashed to solid. Is it possible or could you implement it?

Jeff Tibbals

Is there a functionality similar to using 'hold on' for the normal 'plot' command?

Christine

Is there a manual as to what numbers correspond to what colors and things like that for the changing of the line/grid/everything that is editable?

Giorgio Cosma

I have used just few features of this function, but it's very easy to use and the opportunities it gives are infinite.
Very useful zooming and panning axes functions by using the mouse.

Giorgio Cosma

I have used just few features of this function, but it's very easy to use and the opportunities it gives are infinite.
Very useful zooming and panning axes functions by using the mouse.

Warwick

Many thanks, Paul.

Paul Mennen

> Warwick wrote: Is there an easy way I can set a default to a publication figure?

Certainly Warwick. Create a new file in the plt folder called pltpub.m which contains this:

function out = pltpub(varargin)
out = plt(varargin{:},...
'ColorDef',0,...
'TraceID',0,...
'Options','-AN');

Then for example you can type something like "pltpub(x,[y1;y2;y3])" and those 3 traces will be plotted using parameters appropriate for generating publication hardcopy.

Thanks for your rating and comments Warwick.

Warwick

This is great. So many ways it is better than plotyy. Is there an easy way I can set a default to publication figure so I don't have to type in "Colordef, 0, 'traceID, '', Options, '-All NoCursor' each time?
If not, it's a small price to pay for the time I have saved compared to the "old" way.

Brian Esler

Awesome stuff!
I've just started experimenting with this type of sliderbar interface, and it's incredibly useful. You're functions were extremely instructive.

Paul Mennen

> Marc wrote: Is it possible to link multiple traces to one color?

Hi Marc ... Thanks for the great rating.
And yes you can set the trace colors quite easily. Note that if you type "plt(rand(6,30))" the 6 traces will appear in a different color for each trace, but if you type "plt(rand(6,30),'TraceC',[0 1 0]) then all 6 traces will be green. or use 'TraceC',[0 1 0; 1 0 0] and the odd numbered traces will be green and the evens will be red. Hope that helps :)
~Paul

Marc Cote

Is it possible to link multiple traces to one color? If so can you point me an example that I could use? I'm interested to plot clusters and use the colors to hide/show them.

EDIT: I found out that pltquiv.m seems to be doing what I needed.

Great tool by the way.

Nick Sinclair

busted! i didn't run the demo. got blinded by all the features I guess. I'll have another look at it. Thanks for the prompt help!

Paul Mennen

> Nick wrote: It doesn't seem like it would be too hard to
> add a publish feature that would take away the menu items ...

Looks like you have noticed my bias towards data exploration, yet I haven't ignored the publishing angles entirely. For example, after you get everything looking the way you would like to publish the figure, right click on the y-axis label and the data exploration items (i.e. menu box, cursor controls, cursor readouts) disappear so as not to clutter up your copy.

Also you can include the 'colorDef' command to specify the colors you would like to use. The simplest choice is 'colorDef','Default' or 'colorDef',0 which selects the usual Mathworks' color scheme which isn't bad for publication use. If you start plt with its default dark background colors the screen colors will get inverted when you do a hardcopy (since printing with a black background generally produces miserable results).

For years I've been trying to get plt users to run the demo program (demoplt.m) at least once, yet amazingly enough when I ask new users they nearly always tell me they haven't run it.

That's unfortunate since one of the example plots would usually show the user that the feature they were pining for is available, and shows them the example code that does it. In your case, the appropriate example is called "pub" which shows two plots optimized for publication. These examples are also described in the .chm help file, although of course nobody reads manuals any more (even me) ... and I'm used to that by now :)

Anyway Nick, thanks for your review as well as the 5 stars!

~Paul

Nick Sinclair

Generally spectacular for exploring data. Sadly, I want its functionality for plots I can publish, so I won't likely use it too much.. but for just displaying data in a very flexible way, it is fantastic.

It doesn't seem like it would be too hard to add a publish feature that would take away the menu items from the figure window and change the bg color to white, etc. Perhaps not, though. Great job, anyway!

Brett

I believe that my slowdown was not related at all to the plt program. Ignore any complaints I had in my previous post.

Paul Mennen

Brett - thanks very much for the high rating and the positive review. Regarding the slow update rate, you would have the same problem with plot, plotyy or other matlab plotting routines since like plt they all rely on the same underlying matlab objects (figure, axis, line, etc). That said, I'm curious how you get a 4 second lag. You say "thousands of points". Perhaps you were really into the millions?. For example, try this simple script:

> t = (0:250000)/250000;
> y1 = exp(-2*t).*sin(20*t);
> y2 = t .* cos(5*pi*(1-t).^3);
> y3 = exp(-1.4*t).*sin(10*pi*t.^5);
> plt(t,[y1; y2; y3; humps(t)/100]);

This plots 4 traces, each of which has a quarter of a million points. Quite a stress for the plotting routines yet the update rate on my 6 year old computer (even modest in its day) is around .5 seconds - noticeable but still quite usable. So I suspect there is something else causing your slowdown. If you want to send me your code and/or data (at the email address inside the plt help file) I might have a suggestion for you. For very large data sets decimating the data before plotting may be necessary if smooth zooming/panning is desired.
~Paul

Brett

Absolutely amazing. I got frustrated trying to zoom in on certain parts of graphs I was trying to analyze, came to the user community and found this gem.

The only complaint I have is that when you are graphing one or two lines, the right click zoom and left click drag work smoothly. However, when you use 3 or more lines with thousands of data points the program slows down considerably (upwards of 4-5 second lag time before the graph responds.) This could reflect my computer's performance, obviously.

Aside from that you'd be a fool not to download this if you deal with graphing in matlab.

S

big help. thanks for the files.

Paul Mennen

> Robert Barrie wrote: "Has this been tested on R2009b?"
Thanks for the comment Robert. I found access to a system with R2009b, and indeed there was an issue. I fixed that, so if you download plt today it should work for you. It will likely work with R2010 as well, although since I don't have access to that, I'm hoping one of the plt users with that update will add a comment about that. ~Paul

Robert Barrie

Has this been tested on R2009b?
At first I got an invalid property error on 'share' in demoplt at 14. I removed that parameter and then get
Error using ==> plt (Too many input arguments. pltn at 48)
when trying to run pltn(20)

it looks good but just thought I would ask?

Jeremy D

Great addition to Matlab! This program is a huge improvement on plotting data as well as interactively explore it. The help files and demos are also very useful. It is worth learning how to use. If you use multiple y-axes plots or large amounts of data or you just want to explore data in graphical format quickly then plt is for you.

Paul Mennen

Nitka's comment: "Perhaps, you can look into getting a easy switch for 'regular' looking plots in Matlab standard format."

Hi Nitka. I'll bet you didn't bother reading the chm help file. Or if you ran the demoplt.m example you would have seen "gauss.m" which plots using the default Matlab colors. (Just include 'COLORdef','default' in the parameter list). I'm assuming that's what you mean by 'regular' looking, but I can assure you that plt gives you more flexibility in your color choices than the standard Matlab plot routine. (For example, in plot you can't set the grid color independently from the axis tick lables, which forces you into what many consider to be ugly overpowering grid lines). Try clicking on the "Help" tag in any of the example programs, then go to the 3rd section (command line arguments), and click on "Colors".

Nitika

Thanks Paul, your tool is very convenient for quick look up of data. However, if you want 'journal' quality black & white plots, it requires a lot of work to make it look like you want it to. That way plotyy is easier to handle once you are able to get what you want on the right axes. Perhaps, you can look into getting a easy switch for 'regular' looking plots in Matlab standard format.

Mario Liverpool

Very good job indeed Paul, ur a champion! thank u, now I have plenty of options to plot my graphs with!

Luis Martinez

Very nice graphic tool. Easy to use and understand and very useful when dealing with graphics of different scales. Thanks Paul also for the advices in how to use 'plt', cheers.

Thierry Dalon

Thank you Paul for the regular updates and specific user requests implementations :-) PLT is a great plot utility!

Husam Aldahiyat

No virus in sight.

Paul Mennen

I was wondering why the downloads had dropped off. Come on RJ, be fair. If you had bothered to read the other reviews you would have realized that there is no virus in this submission. Your incompetent anti-virus software will claim that any compressed DLL has a virus. The last time this happened I said I would remove the DLL since I didn't think anybody would still be using it. However I found a few users still were using it, so I put it back in ... and what do I get? Another thoughtless knee jerk reaction. Wouldn't it have been wiser to first contact the author?

R. J.

It claims to have a virus...

Qes M

Excellent graphing add-on when you want to get on and do other coding. Not difficult to use with variety of features and very helpful examples.

Thierry Dalon

I correct: it was not obvious.
Source code is available at author's web site:
http://www.mennen.org/plt/plthome.htm

Thierry Dalon

Like John Baldwinson said: unfortunately it is pcode (no source code).
This is to my opinion contrary to FEX philosophy!
When error occurs you get stacked.
You can not modify/customize the code.
You don't learn anything from it.

John Lintern

Michael Hess

The plt function plots all my signals very well. I can change the colors and chose signals, find the peaks and dips and zoom in and out.
It is a very nice program. Thanks Paul for helping me with my questions.
Kind Regards, Michael

Paul Mennen

Michael wrote: The only problem is that high data signals (e.g 60000 samples) are plotted incorrectly on the right scale.

Michael, I think the newsgroup or a private email would be a better place to discuss bugs as this section is mainly for ratings. But I'll try to answer your question anyway. I chose to plot the traces on the right hand axes using the "xor" line drawing mode which means that when it crosses another trace it inverts the overlapping pixels. This has some advantages when overlaying traces, although as you found it does have one disadvantage. When the trace overlaps itself (which it does many times in the 60,000 sample trace of your example), the trace can cancel itself out in places. It turns out that any method of displaying so many samples in so few pixels is misleading although you may argue that the xor method is not the best for this. I'm actually considering going back to normal mode for the right hand traces, although it will take me some time to verify that everything still works in a consistent manner. In the mean time I'll send you a work around which will allow you to change the plotting mode to the one you prefer.

Michael Hess

Hi Paul,

This plot function is very good. You can scroll and zoom in easily. The only problem is that high data signals (e.g 60000 samples) are plotted incorrectly on the right scale.
This problem appears both when I use the plt(x,y) function and the plt function.
Is their a way to fix this problem or do I do something wrong?
Kind Regards,
Michael

Paul Mennen

> Is this an actual Virus or is it the stupid Virus software
> (Sophos) on my work computer? Adam Groves

Adam - regarding your question about the Virus, I'm not sure the rating section is the best place for it. A direct email to me, or even the Matlab newsgroup would be more appropriate.
At any rate, I figured out why your anti virus software complained about plt_.dll. This dll is compressed using a method that Sophos is not aware of, so it automatically flags it as bad even though the dll does NOT contain a virus.
It sounds like you got over this particular problem, but never the less, I removed this dll from the most recent release because of the concern it has generated. The dll is not really needed (see the release notes) and I could always email it to anybody who requested it.

Adam Groves

Please ignore my Previous Post it was my Antivirus flagging it up unnecessarily; there is no Virus present in this package.

Well, now I have tried it I don’t know where to start, I am a complete Newbie to Matlab and after seeing what PLT is capable of I don’t know where to start.

One thing is clear from the start, PLT is much more capable at plotting whatever type of data you have than the basic plot functions you get with Matlab from the off.

Now I just need to figure out how to use this great software to its full potential.

ps.

Thanks for all your help Paul

Adam Groves

When I downloaded and un-zipped the archive my AntiVirus popped up saying plt_.dll had a virus in it and promptly deleted it.

Is this an actual Virus or is it the stupid Virus software (Sophos) on my work computer?

Snorri Ingvarsson

Great program! I use it frequently for quickly viewing and comparing plots of variables in my workspace. It lets you pick variables with a mouseclick and plot by hitting a button. Then you can remove/add these from the view with a click and you can zoom/pan with the mouse (no going to a toolbar to pick "zoom" and then "pan". Handy when e.g. comparing peak positions in plots.

Thanks alot!

Paul Mennen

> From: Marc Passy(marc.public@passy.us)
> No support for dates as X axis (that I
> can find). Makes this useless for
> timeseries plotting.
Marc, you may want to try the latest update. Actually, I developed plt for an application involving time series exclusively. From my data exploration focus, date ticks were cumbersome for precise rendition of a time series, so dealt with dates and times outside of plt. However, recently I made this part of the plt package. Try running demo\pltn.m - note how the date of the cursored point is shown (resolution to 0.001 second!). Also type in a date or time and the cursor moves to that spot. I no longer use plot() for data exploration, but I would still use it for publishing a chart that could be best interpreted with date ticks. (I've dreamed that plt could totally replace plot, there probably will always be room for both).

Marc Passy

No support for dates as X axis (that I can find). Makes this useless for timeseries plotting.

Paul Mennen

> Hence usefullness greatly reduced by lack
> of source code. If you intend to sell
> the code then get on with it.

No John, I don't plan on selling the code.
The source wont actually do you much good
anyway since the code is not well commented
and is difficult to modify. You might be
better off asking me to make the changes
you need. However I will make the source
code available on request (no charge).
~Paul

John Baldwinson

I expect that a lot of us would need to modify the code for our own publication purposes. Hence usefullness greatly reduced by lack of source code.
If you intend to sell the code then get on with it.

Ben Michell

Still using and enjoying plt. Have recently started using it for an application where I have variable names that are the names of people in the form firstname_surname.

Basically I'd like the full name of the variable to appear as the TraceID. Would it be possible to have that added or get a copy of the m-file so I can modify it myself?

Ben

Jiro Doke

I think the features in this function are very impressive, and I especially like the smooth panning and zooming functions. The purpose of this function should be a visual examination of data, as opposed to a replacement of PLOT. It may not be suitable for creating publication-ready plots, as the appearance is not easily modifiable. Great for data exploration, though.

Ben Michell

I would agree that supplying the m-file would make it more usable for everyone.

Something I would particularly like to add/see added would be the ability to recognise structural arrays. E.G. if I have a structural array in the workspace typing 'plt' would give me the option of plotting any of the numeric varibles within the struct.

Ilya Papiashvili

The idea to enhance the plot is right, but exact type of the additional functionality as well as its implementation may vary. The tool may be more or less convinient for different kinds of tasks. However there is no possibility to adjust it or improove and develop farther, not to fix some bugs, since the .m file is not provided.

Conclusion - limited usability.

Claus Patz

Gil Hornung

Very nice.
I especially like the fact that I can easily find out what are the values of some point.

MATLAB Release Compatibility
Created with R2020a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!