DSPRelated.com
Forums

Please try my new Matlab plotting routine

Started by Paul Mennen May 9, 2004
I developed a 2D Matlab plotting routine for an avionics
application I've been working on, but I've recently realized
that it should have wide appeal as a general replacement
for Matlab's plot routine. I call my routine plt.

Like plot, plt is good for typing at the command prompt for
visualizing your workspace arrays and also can be the core of
your .m applications. I believe plt is a significant advance
over plot.

Is it possible that a lone hardware engineer, programming
in his spare time could best the legions of software engineers
at TMW for the core of Matlab's data visualization capability?
Well I agree it sounds unlikely, but keep an open mind.
We've all seen various Matlab plotting enhancements touted here,
most of which didn't quite live up to their billing. I hope this
isn't the same deal, but I'm sure you will let me know. So give
it a try (release 12.1 or greater required). I'm perfectly
willing to have my ego cut back down to size by reading your
comments added to this thread.

Here are some of the advantages of plt over plot:

- Improved zooming/panning/auto-scaling controls
- Trace selection controls
- Easier cursor movement
- Min/Max finder
- Way better looking grid lines
- User entered annotations (even in compiled applications!)
- Support for metric prefixes
- Built-in support for dual y-axes (left/right)
- Avg and rms readout
- Quick lin/log toggling for x or y axes
- Display expansion history
- Flexible command-line interface

This is freeware (at least for now). I probably will eventually put
some version of this on the Matlab Central file exchange but until
it is more extensively tested I would like to offer it to the
smaller audience of this newsgroup first. To download plt, go
to my web site - www.sigknowledge.com and click on the link
"Matlab plt" at the very top of the page. (For those of you with an
interest in signal processing, check out the next two links as well.)

To get started, try out the sample script plt5.m and follow the
suggestions of the quick start guide at the beginning of the
included help file (plt.chm). You can also view this help file
at: www.sigknowledge.com/sigknowledge_files/plt.htm

Enjoy.

~Paul Mennen

Dear Paul

I have just tried plt5 and must say that I found it impressive (I need
to  further test it though).  There is one problem:  I am running
linux and help won't work.

Many thanks for making plt available.

Regards

Ed



"Paul Mennen" <nospam@mennen.org> wrote in message news:<yDnnc.46494$AK2.10004@newssvr29.news.prodigy.com>...
> I developed a 2D Matlab plotting routine for an avionics > application I've been working on, but I've recently realized > that it should have wide appeal as a general replacement > for Matlab's plot routine. I call my routine plt. > > Like plot, plt is good for typing at the command prompt for > visualizing your workspace arrays and also can be the core of > your .m applications. I believe plt is a significant advance > over plot. > > Is it possible that a lone hardware engineer, programming > in his spare time could best the legions of software engineers > at TMW for the core of Matlab's data visualization capability? > Well I agree it sounds unlikely, but keep an open mind. > We've all seen various Matlab plotting enhancements touted here, > most of which didn't quite live up to their billing. I hope this > isn't the same deal, but I'm sure you will let me know. So give > it a try (release 12.1 or greater required). I'm perfectly > willing to have my ego cut back down to size by reading your > comments added to this thread. > > Here are some of the advantages of plt over plot: > > - Improved zooming/panning/auto-scaling controls > - Trace selection controls > - Easier cursor movement > - Min/Max finder > - Way better looking grid lines > - User entered annotations (even in compiled applications!) > - Support for metric prefixes > - Built-in support for dual y-axes (left/right) > - Avg and rms readout > - Quick lin/log toggling for x or y axes > - Display expansion history > - Flexible command-line interface > > This is freeware (at least for now). I probably will eventually put > some version of this on the Matlab Central file exchange but until > it is more extensively tested I would like to offer it to the > smaller audience of this newsgroup first. To download plt, go > to my web site - www.sigknowledge.com and click on the link > "Matlab plt" at the very top of the page. (For those of you with an > interest in signal processing, check out the next two links as well.) > > To get started, try out the sample script plt5.m and follow the > suggestions of the quick start guide at the beginning of the > included help file (plt.chm). You can also view this help file > at: www.sigknowledge.com/sigknowledge_files/plt.htm > > Enjoy. > > ~Paul Mennen
> "emammendes" wrote > I have just tried plt5 and must say that I found it impressive (I need > to further test it though). There is one problem: I am running > linux and help won't work.
I'm not familiar with the Linux environment, although I'm not surprised the help function doesn't work. In plt when you click on 'Help', effectively a Matlab command such as: dos('hh plt.chm') is executed. Does Linix also support these compiled html files? If so, is there a similar command that would bring up the help file in Linix? Note that even if you can't view the chm file, I have the uncompiled html files on my web site and you can view them at the address given in my original post.
> Many thanks for making plt available. > Ed
Your welcome. Glad you can make use of it. ~Paul
"Paul Mennen" <nospam@mennen.org> wrote in message news:<yDnnc.46494$AK2.10004@newssvr29.news.prodigy.com>...
> I developed a 2D Matlab plotting routine for an avionics > application I've been working on, but I've recently realized > that it should have wide appeal as a general replacement > for Matlab's plot routine. I call my routine plt.
Paul I'm running Matlab Rel 13 on Win XP. When I ask for help this is what I get:
>> help plt
gauss.m: Sum uniform distributions to get Gaussian end function pltsq Everything else seems to work fine. Looks good, but I'll spend some more time with it before commenting further. Derek
>"Rune Allnor" wrote > I think your PLT function is quite neat. Now, one condition for me to > be interested, is that PLT preserves all the functionality that's > already available with PLOT, like returning handles to plotted ojects, > several axes in one plot, adjustment of various object properties, > using AXIS to adjust the domain of the graph etc.
I'd say at this point, PLT provides most but not all of the features of PLOT. It does return the line handles just like PLOT and you can adjust the "domain" although in slightly different ways than you do with plot. PLT only provides for two axes (left/right) and doesn't support the subplot functionality. Perhaps this is somewhat mitigated by plt's improved facility for multiple traces on a single axis. If a lot of interest is expressed, the functionality of plt may expand over time.
> As for PLT itself, I liked the way it's possible to adjust data's > position in the axis by dragging it along with the mouse. Now, while > this is something that on occations would be very useful, I would also > like to have a switch somewhere to turn this functionality off. > Rune
That sounds like a good suggestion. I think I'll add the ability to turn off the mouse panning and zooming with a new 'options' parameter. One would probably want a way to turn it back on from the plt window, probably something not easily done by accident - perhaps by clicking on something in the menu bar.
> "Derek Goring" wrote > I'm running Matlab Rel 13 on Win XP. > When I ask for help this is what I get: > >> help plt > gauss.m: Sum uniform distributions to get Gaussian > > Everything else seems to work fine.
I fixed that problem by providing a contents.m file and by suggesting that plt should be installed in a folder called "plt" (which it looks like you did). I just updated the plt.zip download to reflect that change. Thanks ~Paul
In article <yDnnc.46494$AK2.10004@newssvr29.news.prodigy.com>,
 "Paul Mennen" <nospam@mennen.org> wrote:

> I developed a 2D Matlab plotting routine for an avionics > application I've been working on, but I've recently realized > that it should have wide appeal as a general replacement > for Matlab's plot routine. I call my routine plt. > > [snip]
Nice start... By the way, I am using a Macintosh--Mac OS X (version 10.3.3). I have Matlab R13 (6.5.1.200223) Here are some comments/questions... 1) The Mac is case sensitive so I had to change the name of file from PLT.p to plt.p in order to get the other, example, m-files to work. 2) Clicking Help doesn't work (tries to send e-mail-??) 3) Clicking Print doesn't work 4) How do you reset after pan and zoom? Let me know if there is anything I can do to help you debug the Mac-specific problems. Ken Prager -- Remove _me_ for e-mail address
In article <eedcb27.9@webx.raydaftYaTP>,
 "Paul Mennen" <paul@mennen.org> wrote:

> > Ken Prager wrote: > > Nice start... > > 1) The Mac is case sensitive so I had to change the name of file > from PLT.p to plt.p > > Ok, thanks for that info. Another Mac user contacted me who was > mystified why it didn't find plt. Now I can advise him. > > I've changed the name of the file to lower case inside the zip > archive, so future downloaders shouldn't have this problem.
OK, thanks.
> > 2) Clicking Help doesn't work (tries to send e-mail-??) > > So I have the same questions that I had for the linux user. Can you > read a .chm file from a Mac? If so, is there an equivalent matlab > command that can bring up the chm file. (I currently use 'dos(hh > plt.chm)' which of course wouldn't work on a mac.)
There are several viewers available to read CHM files. One is xCHM, which is from Linux, recompiled for the Mac. Another is CHM Viewer. I chose CHM viewer and it works fine. To open your help file from within Matlab, you can call...
>> unix('open -a /Applications/CHM\ Viewer.app PLT.CHM')
...however, I am not sure if you'll want to hardcode the command/paths. Seems like the kind of thing that should be set via an environment variable.
> > 3) Clicking Print doesn't work > > Also not surprising. I'm thinking of removing this feature since I'm > not sure how much extra functionality I am providing. You can always > click on "menu" and then "file", "print" on the menu bar.
OK.
> > 4) How do you reset after pan and zoom? > > Right click on the x-cursor edit box until you return to the desired > view (rtfm :)
OK, thanks. I guess perusing TFM was not good enough. ;) Ken P. -- Remove _me_ for e-mail address
"Ken Prager" <prager_me_@ieee.org> wrote in message 
> There are several viewers available to read CHM files. One is xCHM, > which is from Linux, recompiled for the Mac. Another is CHM Viewer. I > chose CHM viewer and it works fine. To open your help file from within > Matlab, you can call... > >> unix('open -a /Applications/CHM\ Viewer.app PLT.CHM')
I'd be tempted to try something like: if isunix unix('open -a /Applications/CHM\ Viewer.app PLT.CHM'); elseif ispc dos('hh PLT.CHM'); end; Would this work on a Mac? A Linux machine?, Other platforms? If anybody has other suggestions, please let me know. Thanks ~Paul
"Paul Mennen" <nospam@mennen.org> wrote in message news:<yDnnc.46494$AK2.10004@newssvr29.news.prodigy.com>...
snip snip
> > This is freeware (at least for now).
Snip Does this imply that at some stage in the future, it will cease to be free? And if that's the case, does your plt.p file have a time bomb in it that will prevent it from operating on the day that you start charging? And on that day, will all the functions and scripts that I have written using plt become unusable unless I pay you $$$? I know, I know, I'm a cynical old bugger. But I'm also of Scottish descent, and I know how to look after my pennies.........
> "Derek Goring" wrote > > This is freeware (at least for now). > Snip > > Does this imply that at some stage in the future, it will cease to be > free? And if that's the case, does your plt.p file have a time bomb > in it that will prevent it from operating on the day that you start > charging?
Nah. I'm not that devious. You will be happy to know that I did not build any time bombs into plt. I've heard that TMW is 99.5% sure that newer versions of Matlab will still be able to run older versions of p-code, so it should still be running for years to come. So if I do decide to charge for it, I guess it will have to be for features above and beyond the current version.
> I know, I'm a cynical old bugger. But I'm also of Scottish > descent, and I know how to look after my pennies.........
Ah, I think I'm at least as cynical as well, and as far as I know I don't even have any Scottish blood :) ~Paul