From: Schwab,Wilhelm K <bs...@an...> - 2010-09-17 20:43:30
|
Hello all, First, some context to explain my arrival in your in-basket: I have had more than enough of Microsoft's slowly breaking my long-standing code; escape from Windows has gone from a long-term backup plan to urgency to reality in need of cleanup around the edges. Many fellow travelers have happily switched to Macs, but I have an interest in building strange hardware; Linux is the logical choice. I am an avid user and advocate for the Smalltalk programming language and IDE. Pharo (http://pharo-project.org/home) has emerged as a very nice cross-platform Smalltalk with attractive licensing and goals close enough to mine that I can make progress. Initially, I was building new things in Pharo and falling back on Dolphin Smalltalk and Windows for number crunching and batch graphics. An interface to gnuplot was handling ad-hoc graphics fairly well, at least for small data sets. The time came to start to handle larger data sets on Linux, and gnuplot bogged down. Initially led to believe that gnuplot would take only text input, I started to retrofit binary transmission of data to it, but it has been very tedious to make it work. Annoyances mounted and I began looking for alternatives. Alan was kind enough to indulge me in some early questions via private email. In that exchange, I provided some initial reactions to PLplot's interface and documentation. A few highlights: (1) functions do not return error codes; instead they hijack stdout; I strongly urge returning zero on success and providing information about errors using distinct non-zero error codes (2) function names are cryptic. Call it a failing of mine, but I can barely tell them apart. It will soon be inconsequential to me, because I will use my Pharo binding (which I will release when it is worth having) and forget that the C functions exist, but I think for new arrivals, a set of intention-revealing names would be far superior to current names. It reduces the value of the documentation and the examples - what does plscol() do again? Is that color or column? My 2 cents, and I doubt I'm alone. (3) saving graphs to files is critical, but it should be optional. It has been difficult to get a clear picture of whether/how well one can draw into memory. Please see below. (4) it would be really nice to have something that takes an array of function values, a starting x/time value and an increment and draws a polyline. I created something to create the x array in memory, but there should be a way to skip that step. Apologies/thanks if I missing the obvious. Is anyone using plsmem()? Using files for every plot I want to see is going to get old. Temp files, sure, but it's messy and should be avoidable. Any terse advise or success stories (as validation that it can work) would be greatly appreciated. I have hopefully figured out how to use sub-plots. I see how to label the axes on the subplots, at least the simple way. How does one put a title over a grid of plots to identify something they have in common? Is there a way to label a common x or y axis (for a column or row)? Bill |
From: David M. <da...@as...> - 2010-09-17 21:25:20
|
Hi, Bill, Here are a few comments in response to yours... On Sep 17, 2010, at 11:21 , Schwab,Wilhelm K wrote: > (1) functions do not return error codes; instead they hijack > stdout; I strongly urge returning zero on success and providing > information about errors using distinct non-zero error codes I think this is a very valid criticism/complaint. I think libraries should stay away from stdin/stdout/stderr, but even more so I think they should never call exit(). It could be useful to have an optional "warning" (and/or "error" and/or generic) callback so that the library client (i.e. the user's code) can be informed of certain conditions that are awkward to return in a single error code. Some (all?) of this might already be there. > (2) function names are cryptic. Call it a failing of mine, but I > can barely tell them apart. It will soon be inconsequential to me, > because I will use my Pharo binding (which I will release when it > is worth having) and forget that the C functions exist, but I think > for new arrivals, a set of intention-revealing names would be far > superior to current names. It reduces the value of the > documentation and the examples - what does plscol() do again? Is > that color or column? My 2 cents, and I doubt I'm alone. Other may know more about this, but I think it is leftover from PLplot's PGPLOT heritage. In any case, a collection of #defines should suffice to provide more human-friendly names. It would be nice to standardize that or, even better IMHO, change the names and provide a collection of #defines for backwards compatibility. > (4) it would be really nice to have something that takes an array > of function values, a starting x/time value and an increment and > draws a polyline. I created something to create the x array in > memory, but there should be a way to skip that step. Apologies/ > thanks if I missing the obvious. Good idea. > How does one put a title over a grid of plots to identify something > they have in common? I'm not sure, but maybe manually setting the viewport to "full page" and then using one of the text writing functions? > Is there a way to label a common x or y axis (for a column or row)? How about just labeling the X axes of the bottom row plots and the Y axes of the left column of plots and leaving all the rest of the plots unlabeled? Hope this helps and thanks for the fresh perspective! Dave |
From: Schwab,Wilhelm K <bs...@an...> - 2010-09-18 23:32:00
|
Dave, I see where you are going re a global caption. plmtex() seems appropriate. Is there a preferred way to set a full-page viewport for it? One thought is to simply draw early and maybe it will have defaulted to same?? Obviously it would be better to have it be intentional. Labeling only an x or y axis will work, but let's say the goal is to label a common y axis for a row of graphs. Is there a distinction between empty (just that) and null (non-existent) label for the x axis? In C terms, I guess I am asking whether the library will recognize a NULL as meaning "don't draw the label, and don't even reserve space for it" vs. an empty string saying "reserve space, just don't put anything there." Does that make sense? There are various ways it could misbehave; I assume the most likely is that empty x-axis labels would lead to perhaps unwanted space between the various sub-plots. Bill ________________________________________ From: David MacMahon [da...@as...] Sent: Friday, September 17, 2010 5:10 PM To: Schwab,Wilhelm K Cc: plp...@li... Subject: Re: [Plplot-general] Hello, and a few questions > How does one put a title over a grid of plots to identify something > they have in common? I'm not sure, but maybe manually setting the viewport to "full page" and then using one of the text writing functions? > Is there a way to label a common x or y axis (for a column or row)? How about just labeling the X axes of the bottom row plots and the Y axes of the left column of plots and leaving all the rest of the plots unlabeled? Hope this helps and thanks for the fresh perspective! Dave |
From: Jerry <lan...@qw...> - 2010-09-22 23:38:22
|
Hi Bill, When I wrote the Ada bindings I changed most of the names and assigned names and/or structures to many quantities which are otherwise known only as integer values. See plplot.ad[bs]. For example, plscol0 becomes Set_Pen_Color. There is an additional binding which uses the traditional names, plplot_traditional.ad[bs]. (.ads files, "specs," are a little like C header files. .adb files, "body," are the implementation part.) Jerry On Sep 17, 2010, at 11:21 AM, Schwab,Wilhelm K wrote: > (2) function names are cryptic. Call it a failing of mine, but I > can barely tell them apart. It will soon be inconsequential to me, > because I will use my Pharo binding (which I will release when it is > worth having) and forget that the C functions exist, but I think for > new arrivals, a set of intention-revealing names would be far > superior to current names. It reduces the value of the > documentation and the examples - what does plscol() do again? Is > that color or column? My 2 cents, and I doubt I'm alone. |