dependancies #1

Closed
Davidbhodge opened this Issue Oct 26, 2012 · 8 comments

Comments

Projects
None yet
2 participants

Hi.

This apprently needs index-mapped array and also a library called defclass-star.

Where would I find that?

it would appear that there is a dependancy on your toolbox - format-ext - as well.

Owner

smithzvk commented Oct 26, 2012

You can get index-mapped-arrays on my github page: https://github.com/smithzvk/index-mapped-arrays

Defclass-star can be gotten from quicklisp. It is given in the package hu.dwim.defclass-star. I'll patch in a few hours officially, but I am afk right now.

Sorry about format-ext, I'll try to figure it out in a bit.

ZGnuPlot is definitely not ready for release, but I needed to use something and I just defaulted to the homebrew solution. If you want to use this for the cousera code, you might just cut the plotting out as it is a pretty small piece of the program.

Hey Thanks,

Well, there are quite a few references too toolbox functions it seems (format-ext, ttrav, /., mkstr )

and the make-gnuplot-setup function needs to be exported as well

get over that i can produce some plots.

cheers

On 26/10/2012, at 10:08 PM, Zach Kost-Smith notifications@github.com wrote:

You can get index-mapped-arrays on my github page: https://github.com/smithzvk/index-mapped-arrays

Defclass-star can be gotten from quicklisp. It is given in the package hu.dwim.defclass-star. I'll patch in a few hours officially, but I am afk right now.

Sorry about format-ext, I'll try to figure it out in a bit.

ZGnuPlot is definitely not ready for release, but I needed to use something and I just defaulted to the homebrew solution. If you want to use this for the cousera code, you might just cut the plotting out as it is a pretty small piece of the program.


Reply to this email directly or view it on GitHub.

Owner

smithzvk commented Oct 26, 2012

Okay, I am pushing a commit that should patch things up for now. I tracked down and included any functions from Toolbox that were being used. I didn't see any instances of "/." or "ttrav", however.

It seems to work for me (even after wiping fasl files), so please do try it. In case this isn't clear from the code, and since there is no Readme file yet, something like:

(zgp:plot (zgp:make-gnuplot-setup :x-range '(-1 10) :autoscale :y)
          'sin
          '((1 3) (5 7) (9 0) (2 4) (6 8)))

Should do as you expect, plot the sin function from -1 to 10 and plot the points given. The interface is a mess and I am thinking of how to do better.

What do you mean "make-gnuplot-setup function needs to be exported as well" as it seems exported. I wonder if I screwed up something in Git... Please let me know if you still see this.

commits 32bd76b through fc3d934

@smithzvk smithzvk closed this Oct 26, 2012

@ghost ghost assigned smithzvk Oct 26, 2012

Hi,

ttrav and the macro ./ are found in the file that implements format-ext I think.

I hacked things and just copied them into my local copy for the moment , which enabled things to work.

In terms of "make-gnuplot-setup" ( ah well, it was late when I wrote that email….) it i apparently unexpected , so sbcl complains

The interface is not to bad, btw, and i would be interested in getting this to work just to see if can fit what I have in mind.

However, I would want to reduce the dependancies somewhat - I will pull down the latest commit and then do some investigation

Cheers
On 27/10/2012, at 1:08 AM, Zach Kost-Smith notifications@github.com wrote:

Okay, I am pushing a commit that should patch things up for now. I tracked down and included any functions from Toolbox that were being used. I didn't see any instances of "/." or "ttrav", however.

It seems to work for me (even after wiping fasl files), so please do try it. In case this isn't clear from the code, and since there is no Readme file yet, something like:

(zgp:plot (zgp:make-gnuplot-setup :x-range '(-1 10) :autoscale :y)
'sin
'((1 3) (5 7) (9 0) (2 4) (6 8)))
Should do as you expect, plot the sin function from -1 to 10 and plot the points given. The interface is a mess and I am thinking of how to do better.

What do you mean "make-gnuplot-setup function needs to be exported as well" as it seems exported. I wonder if I screwed up something in Git... Please let me know if you still see this.


Reply to this email directly or view it on GitHub.

Owner

smithzvk commented Oct 28, 2012

Please do tell me if these new commits fix the issues for you and reopen if it doesn't.

If you want to take part in designing the UI, I am more than happy for your input. I have been a GnuPlot user for a long time and this library is, in part, designed to have a better interface than the standard GnuPlot command line (which I think boarders as horrific if you are trying to do anything beyond extremely simple stuff).

While designing my UI, however, I have changed my mind on how it should look and work so many times that the current state of things is quite schizophrenic. Please don't get too used to the way things are as I would like to make it much better which probably means incompatibly different (but easy to update).

Anyway, let me know if you need anything else to make the code work better for you.

Hi Zach,

So, it works nows.

Right now I am trying to make my mind up exactly what I want to do for a visualisation component for a statistics package that I am involved in.

Right now Gnuplot seems to be the mot practical approach as there is pretty straightforward portability and and well known, if ugly, command language.

I would be interested in your vision of what you would like to do with the interface. Frankly, to start with I want to be able to create time series plots, with multiple series and with error bars and scatter plots.

As generally, one would e doing tis from the repo I am interested in fairly terse syntax to limit typing overhead.

I could, for instance see a thin layer on top of the existing interface which would suffice, but before I go and start that would be interested in hearing your ideas for the future.

Cheers

On 28/10/2012, at 10:20 PM, Zach Kost-Smith notifications@github.com wrote:

Please do tell me if these new commits fix the issues for you and reopen if it doesn't.

If you want to take part in designing the UI, I am more than happy for your input. I have been a GnuPlot user for a long time and this library is, in part, designed to have a better interface than the standard GnuPlot command line (which I think boarders as horrific if you are trying to do anything beyond extremely simple stuff).

While designing my UI, however, I have changed my mind on how it should look and work so many times that the current state of things is quite schizophrenic. Please don't get too used to the way things are as I would like to make it much better which probably means incompatibly different (but easy to update).

Anyway, let me know if you need anything else to make the code work better for you.


Reply to this email directly or view it on GitHub.

Owner

smithzvk commented Oct 30, 2012

Regarding error bars on time series, I used to have error bars working, I'm not sure if it is now. If you provide be with a sample of your data, I could see what sort of code I would write if I was in your place...

Regarding the interface: My opinions on GnuPlot is that its interface is extremely poorly designed. I have a rant in some of the source files of the library to this effect, but the basic gist is that Gnuplot was designed by accretion and thus doesn't have a consistent interface for anything beyond simple 2D plots, and even then, you don't know what your plot will look like until you plot it.

The entire point of this library is to replace the interface of GnuPlot with a sufficiently thick Lisp UI/API layer. The really only good things I like about GnuPlot is that it has such good portability and more than ample support of output formats (and other non-technical issues like the fact that I happen to be familiar with the program, it's FOSS, etc.). Essentially the only thing GnuPlot brings is it draws the plots, allows me to save the plot to several vector and raster output formats, and in 3D it allows for some simple rotation interaction via the mouse.

What I am basically saying is that the library is really only the interface, and the interface hasn't yet been defined. Please do not build a new interface on top of this, or if you do, please keep in touch as I'll want to backport anything you do to the library. The better solution is to work together and come up an interface that works for both of us.

I think that we are on the same page regarding the interface. My vision of this interface is to have as terse of a syntax as possible and to have intelligent defaults when they can be derived from the items you would like to plot. I would like to have a (hopefully) single plot command and a generic function interface that will allow the user to plot common data types (such as arrays, lists, functions) in a smart default way and a method where the user can extend the plot interface if they so choose. Basically I want something that is as terse as:

(plot 'sin (lambda (x) x) #p"some-file-name.dat" #(1 2 3 4 5 6 7) '((0 1) (.1 .1) (.2 .2) (.3 .3)) (make-time-series))

Which should plot the two functions, the data in the file, the vector (assuming the x coordinates are 0,1,...6), the list of (x y) coordinates, and the object returned by make-time-series possibly using a user defined method to do so. A lot of this works already, but not all of it. I have largely fallen short of this goal so far as the plot function doesn't attempt to derive the proper parameters from the "plottable" arguments and all configuration of GnuPlot is done manually through this gnuplot-setup structure and by wrapping your functions and data in a func-rep or data-rep object, respectively. This makes it fairly verbose.

However, as annoying as it is to manually configure the plot, the reality is that any publication quality plot is going to necessarily require some manual configuration as well as tweaking with a vector graphic program after the plot is generated (for instance, typesetting equations for the plot is probably not within the realm of possibility for this library).

The library is working for me and I use it for work on a daily basis. That said, I am far from happy with it. As I mentioned, the current interface is a bit of a mess. More importantly, though, the code itself needs serious refactoring (I am pretty embarrassed about it, hence why I didn't publish this code long ago). One of the big picture goals of this library is to extend the abilities of GnuPlot so that it can make things like attractive vector fields and contour plots without writing excessively complex Gnuplot scripts. For instance, I would like to be able to define a contour plot without doing this: http://gnuplot-tricks.blogspot.com/2009/07/maps-contour-plots-with-labels.html In order to do this, I need a stable and flexible interface to work with.

So, please feel free to make this library better and don't bother breaking the interface as it is currently in flux anyway.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment