I have adapted the code for Viewrendered3's new ability to plot data in
nodes, and with minor changes it functions as a stand-alone command to take
data from the clipboard and plot it. So if you get one- or two-column data
into the clipboard you can take a quick look at it.
Here is an example of X-Y data:
1 1
2 .5
3 -6
# comment
; comment
4 -16
5 -2
6 5
7 10
Non-numeric lines are ignored except for special configuration sections, so
you can copy a large range of data sources and plot them instantly. You
could also do some computation in a node that you run with CTRL-B, and add
a few lines to format it and copy it to the clipboard. I have found that
ability to be very useful while I've developed code. The script is very
flexible and robust (so far as I know, anyway).
You do need to install *pyperclip* (for getting the clipboard), and
*matplotlib* to do the actual plotting - you probably have it installed
already. You could change the script to use Leo's own clipboard code or
some other clipboard package; I just happen to like pyperclip and think
it's easy to use.
As of this evening, the script is in *scripts.leo* in the *devel* branch,
under a new node with the headline *Plots and Graphs*. More information
and usage details are in the docstring of the script, and the new *Help for
plot-2d* menu item in VR3 is very applicable since the code is largely the
same.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/leo-editor/799a0e95-42c5-40d7-b901-4961a24762d4n%40googlegroups.com.