Closed brittAnderson closed 2 years ago
Hi, fixed this in a certain sense. Let me tell you that I do not know how to reproduce @mmaul 's cookbook. His cookbook is not entirely outdated, as eazy-gnuplot is made robust to various inputs. But some things need to be changed.
Eazy-gnuplot now has a mechanism to convert a list into a string delimited by a certain delimiter. His cookbook was made before it became available (though largely the code works). Therefore, this better version works now. Note that we no longer use strings to specify ranges and views.
(defun 3d-plot (output)
(with-plots (*standard-output* :debug nil)
(gp-setup :output output :terminal '(pngcairo))
(gp :unset :key)
(gp :set :isosamples 40)
(gp :set :title "j_0(r^2)")
(gp :set :xrange '(-4 4))
(gp :set :yrange '(-4 4))
(gp :set :ztics 1)
(gp :set :view '(29 53))
(func-splot "besj0(x**2+y**2)")
(format t "~&replot~%"))
output)
To add keywords recognized by this mechanism, please see https://github.com/guicho271828/eazy-gnuplot/blob/master/src/package.lisp#L63-L85 .
Also, the most reliable method to have a full control of the output is to use a symbol.
For example, use |29,53|
, which is a symbol whose name is a string "29,53"
. It is quoted by surrounding vertical bars ||
.
Symbols are guaranteed to be printed without quotes.
Done. So much work! I finished checking all cookbook examples and updated the cookbook.
Several multiplot examples do not work, I remember @mmaul told me about this before.
The problem is that the cookbook was based off an ealier version of eazy-gnuplot, there was a point where changes were made to the API which was incompatible with the cookbook code.. I can provide a fork of eazy-gnuplot at the time where the cookbook still worked if your interested.
Sent with ProtonMail secure email.
------- Original Message -------
On Tuesday, March 1st, 2022 at 1:57 PM, Britt Anderson @.***> wrote:
Both in my own function and trying to use the function at In 62 at cookbook get the error message "Evaluation aborted on #<TRIVIA.LEVEL2:MATCH-ERROR {1004FAADF3}>." It seems to be related to the comma in the list for
gp :set :view ...
If I just use a single number it works.'map
also works, but I cannot set the individualrot_x
rot_z
I am happy to share the code I am working on, but since this is reproducible with the code in your notebook/cookbook that may be easier for you to test.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
The update works well for me. Thank you for all the work. I am using common lisp for teaching a course where I demonstrate an algorithm, but students code their own implementations (mostly in python). Graphing has been a challenge and your eazy-gnuplot library has been a great aid, but for the section on "swiss-roll" data I wanted to change the view to demonstrate the challenge of recovering a curved 2-d manifold. Your update let's me do that now.
btw, I updated the cookbook but did not do so for the html output. Now http://guicho271828.github.io/eazy-gnuplot/ is also new.
Both in my own function and trying to use the function at In 62 at cookbook get the error message "Evaluation aborted on #<TRIVIA.LEVEL2:MATCH-ERROR {1004FAADF3}>." It seems to be related to the comma in the list for
gp :set :view ...
If I just use a single number it works.'map
also works, but I cannot set the individualrot_x
rot_z
I am happy to share the code I am working on, but since this is reproducible with the code in your notebook/cookbook that may be easier for you to test.