From: Joao C. <jc...@fe...> - 2002-01-11 20:52:20
|
On Friday 11 January 2002 4:42 pm, Olof Svensson wrote: > Joao Cardoso wrote: > > What about "plimage" for the new function and "plimagefe" (front end)= for > > the current one? Or, if compatibility with PGPLOT is not mandatory, > > "plimages" (straight) for the new function? hum, this could be > > misleading, Pick your own names, I'm not concerned with that. > > How about calling the existing function "plgridimage" and the new > function "plimage"? You could even think of make it possible to pass > the list of co-ordinates for the pixels (however I have no idea > if this would be useful or not...): Neither me. I would be nice if all 2D plplot functions have the same interface, but o= nly=20 c_plmesh(PLFLT *x, PLFLT *y, PLFLT **z, PLINT nx, PLINT ny, PLINT opt) takes this approach. Neither plcont() nor plshade() , nor PGPLOT cpgima() (void cpgimag(const float *a, int idim, int jdim, int i1, int i2, int = j1, int j2, float a1, float a2, const float *tr)), does, so lets keep the current definition. > plimage(PLFLT *idata, PLINT nx, PLINT ny, > PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, > PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax) > > plgridimage(PLFLT **idata, PLFLT *x, PLFLT *y, PLINT nx, PLINT ny, > PLFLT xmin, PLFLT xmax, PLFLT ymin, PLFLT ymax, > PLFLT Dxmin, PLFLT Dxmax, PLFLT Dymin, PLFLT Dymax) OK, as you at sfr.fr start it, you have the right to choose :). You use=20 plimage(PLFLT *data, ...) and I will use plimage1(PLFLT **z, ...). > > Yesterday I though that plimage() structure was steady, but today I'm= not > > certain of that. It looks like that it is not possible to save a > > displayed image in another format, opening another device and replayi= ng > > the plot buffer. (Using the standard plmkstrm/plcpstrm/plreplot/plend= 1 > > way of saving plots). > > I noticed a problem when resizing a plot with several subplots > containing images I have just now tried it using the current CVS version, and detected no=20 problem... > - Alessandro and I solved this problem by saving > and restoring the Dxmin etc parameters in plbuf_image and rdbuf_image. I can't see how this patch could correct it, as Dxmin etc are not anymore= in=20 the pls structure... you have been mixing versions. =2E.. > Maybe the problem you site above can be solved by the same patch. No, the solution to "my" problem is to change the block=20 if( plsc->dev_fastimg =3D=3D 0) { from plimage() to plP_image(), so that when replaying the plot buffer it = will=20 be replayed to the other device, even if it is a "slow" one. =2E.. > > But the modifications should be minor, so you can start to code your > > modifications and send a patch. > > Ok, if you agree on the naming and argument scheme above I'll start mak= ing > a patch. Lets wait till I move the "if( plsc->dev_fastimg =3D=3D 0) {" block fro= m=20 limage() to plP_image(), OK? I must admit that I'm not in the mood for this, but I will make a try=20 tomorrow. Thanks, Joao |