4.34783

4.3 | 25 ratings Rate this file 128 downloads (last 30 days) File Size: 877.98 KB File ID: #4936

plt

by Paul Mennen

 

17 May 2004 (Updated 11 May 2010)

Code covered by the BSD License  

An alternative to plot and plotyy optimized for data exploration

Download Now | Watch this File

File Information
Description

--- plt version 11Mar10 ---
An alternative to MatLab's plot/plotyy for 2D applications.
Like plot, plt commands can be typed at the command prompt to
display your workspace arrays and can also be the core of
your .m graphical applications. Some plt's advantages are:

Optimized for data exploration
Improved zooming, panning, and auto-scaling controls
Workspace plotting (interactive selection of variables to plot)
Automatically generated legend with powerful trace selection controls
Up to 99 traces on a single axis (or more if a legend isn't needed)
Support for dual y-axes (left/right linkable)
Support for sub-plots, each with individual cursor readout.
Fast and easy cursor movement
Delta cursor provides easy difference readout
RMS, mean, y/x ratio & abs(x+yi) readouts
Peak/Valley finder
Better looking grid lines with selectable color
User-entered annotations
User editing of trace properties and figure colors
Mouse and keyboard driven data modification
Support for metric prefixes
Quick linear/log toggling for x or y axes
Display expansion history
Flexible command-line interface
Includes advanced GUI components with sample GUI programs
Extensive on-screen help with 22 example script and function .m files
Congenial "customer" support & receptive to suggestions from users
Compatible with R12.1 or later

MATLAB release MATLAB 7.9 (2009b)
Other requirements Matlab version R12.1 or later
Zip File Content  
Other Files
contents.m,
demo/bounce.m,
demo/circles12.m,
demo/curves.m,
demo/demoplt.m,
demo/dice.m,
demo/editz.m,
demo/gauss.m,
demo/movbar.m,
demo/plt5.m,
demo/plt50.m,
demo/pltn.m,
demo/pltquiv.m,
demo/pltsq.m,
demo/pltvar.m,
demo/pltvbar.m,
demo/pub.m,
demo/subplt.m,
demo/subplt8.m,
demo/tasplt.m,
demo/trigplt.m,
demo/weight.m,
demo/wfall.m,
demo/winplt.chm,
demo/winplt.m,
demo/winplt.pdf,
ebar.m,
html.zip,
license.txt,
plt.chm,
plt.m,
quiv.m,
vbar.m
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (36)
31 Jul 2004 Gil Hornung

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

08 Sep 2004 Claus Patz  
18 Dec 2004 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.

10 Feb 2005 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.

12 Apr 2005 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.

11 Aug 2005 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

15 Aug 2005 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.

11 Apr 2006 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

17 Jan 2007 Marc Passy

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

24 Jan 2007 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).

06 Sep 2007 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!

18 Oct 2007 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?

22 Oct 2007 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

04 Dec 2007 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.
 

17 Jan 2008 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

20 Jan 2008 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.

01 Apr 2008 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

24 Apr 2008 John Lintern  
03 Jul 2008 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.

08 Jul 2008 Thierry Dalon

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

14 Aug 2008 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.

08 Sep 2008 R. J.

It claims to have a virus...

27 Sep 2008 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?

07 Feb 2009 Husam Aldahiyat

No virus in sight.

09 Feb 2009 Thierry Dalon

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

24 Feb 2009 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.

27 Aug 2009 Mario Liverpool

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

28 Sep 2009 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.

11 Oct 2009 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".

10 Nov 2009 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.

10 May 2010 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?

11 May 2010 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

01 Jul 2010 S

big help. thanks for the files.

08 Jul 2010 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.

08 Jul 2010 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

19 Jul 2010 Brett

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

Please login to add a comment or rating.
Updates
24 May 2004

- Changed plt5 and pltn sample scripts so that don't use interp so that no toolboxes are required
- renamed PLT.m to plt.m in the archive so that it will work properly on unix systems

15 Jul 2004

Many enhancements - most importantly the workspace plotter

04 Aug 2004

Added editz.m example.
Minor bug fixes and documentation updates.

29 Mar 2005

Added several auxiliary functions which makes it easir to build a GUI application based on plt. Added two more example programs to demonstrate some of the new features.

30 Mar 2005

The version I uploaded yesterday had a missing file in the html documentation.

11 May 2005

Added new example programs (curves.m and winplt.m). Added additional GUI objects (edit and popup text objects). Minor bug fixes and documentation improvements.

12 May 2005

Added new example program (curves.m).
Added new GUI obects (edit text and popup text).
Minor bug fixes and documentation improvements.

15 Sep 2005

Various enhancements and bug fixes - see release notes in help file

16 Sep 2005

Several new features. See release notes in help file. (Yesterday's upload didn't seem to work)

19 Sep 2005

Various enhancements and bug fixes. See release notes in help file.

07 Nov 2005

Minor bug fixes.
Documentation updates

19 Dec 2005

Added a few new features

27 Jan 2006

Minor enhancements and bug fixes

11 Apr 2006

Several enhancements and one additional example .m file

11 Apr 2006

- Several enhancements
- Additional example .m file
- Bug fixes
- Documentation improvements

27 Jun 2006

New features and bug fixes

27 Jun 2006

Added some new features and bug fixes

30 Jun 2006

A few enhancements and bug fixes

17 Aug 2006

New features
- Multiple traces allowed on right axis
- More flexible dual cursors

05 Sep 2006

Added functionality for vertical bar, error bar and quiver plots

27 Nov 2006

Several improvements and bug fixes. See release notes in plt.chm or html.zip

24 Jan 2007

Added facility for time and date cursoring as well as other customized cursor capabilities. Several bug fixes and documentation improvements

29 Jan 2007

Sorry the last version only lasted a week, but I found some bugs that needed fixing. Also I added a new demo program and a few features.

06 Mar 2007

- Added new example program (wfall.m)
- Improved calling sequence for the slider pseudo object
- Minor bug fixes

18 May 2007

Minor enhancements (see release notes)

09 Jul 2007

Improved some of the demo programs, and minor bug fixes and documentation updates. Now includes a compiled version (.dll)

03 Dec 2007

Added one more .m example program, and updated the others for clarity. Other minor improvements.

14 Mar 2008

Several minor bug fixes and enhancements. (Please see the release notes).

14 Apr 2008

Added the linking of the right and left hand axes for panning and zooming. For other changes, see the release notes in plt.chm

16 Jun 2008

- Added a new example program
- Minor enhancements (see release notes)

13 Aug 2008

Added yet another demo program (subplt.m). Also fixed a few bugs and made minor improvements (see release notes).

20 Aug 2008

Update to fix bug introduced with last weeks version. Also added yet another demo example (subplt8.m)

03 Oct 2008

Minor enhancements - see release notes

06 Oct 2008

Minor enhancements, see release notes

18 Jan 2009

Major update to the subplot capability. Other improvements and bug fixes. See release notes for details.

12 May 2009

Fixed a bug which caused plt to crash when called from a guide application. Other minor changes (see release notes)

11 Aug 2009

First release of plt including the full .m source code. Added the TraceMk parameter. See release notes for other changes.

26 Oct 2009

Major rewrite of all the programming examples involving GUIs mostly for improved coding style and clarity. Some enhancements and bug fixes to plt (see release notes).

08 Nov 2009

Sorry to bother you with another update so soon after the last one, but a few bugs were reported. In addition to fixing those, I also added significant enhancements to the winplt.m demo program and added a few minor features to plt.

04 Dec 2009

Added a new example (pub.m) to show how to optimize a plot for publication (instead of the typical data exploration uses of plt). See release notes for other minor changes

25 Feb 2010

Bug fixes, Added distance (abs(x+yi)) cursor readout

11 May 2010

Changes for compatibility with Matlab version R2009b and other minor enhancements

Tag Activity for this File
Tag Applied By Date/Time
data exploration Paul Mennen 22 Oct 2008 07:20:03
plot Paul Mennen 22 Oct 2008 07:20:03
plotting Paul Mennen 22 Oct 2008 07:20:04
plotyy Paul Mennen 22 Oct 2008 07:20:04
cursors Paul Mennen 22 Oct 2008 07:20:04
zooming Paul Mennen 22 Oct 2008 07:20:04
gui objects Paul Mennen 22 Oct 2008 07:20:04
panning Paul Mennen 22 Oct 2008 07:20:04
subplots Paul Mennen 19 Jan 2009 10:33:30
gui objects Arnaud Thabot 24 Mar 2009 20:27:04
data editing Paul Mennen 09 Nov 2009 10:31:01
workspace plotting Paul Mennen 09 Nov 2009 10:31:01
subplots victor rodriguez 15 Jul 2010 19:40:42

Contact us at files@mathworks.com