From: <koi...@ya...> - 2022-01-19 01:27:07
|
Hi Anan, Thank you very much for your quick response, and for the detailed information you kindly sent me. After reading through PLplot document I realized that my first email was not very clear and might have confused you. Let me show my code first: ######################################### # CODE STARTS FROM HERE (FORTRAN) ######################################### subroutine plplot_contour(lclab,ccol,clskip,clspace,cthick,shedge,xg,yg,zg) implicit none logical , intent(in) :: lclab integer(4) , intent(in) :: ccol, clskip real(8) , intent(in) :: clspace real(8) , intent(in) :: cthick real(8) , intent(in) :: shedge(:) real(8) , intent(in) :: xg(:), yg(:), zg(:,:) ! work integer(4) :: nxc, nyc integer(4) :: i, nshedge, sigdig nxc = size(zg,1) nyc = size(zg,2) nshedge = size(shedge) call plcol0(ccol) call plwidth(cthick) do i=1, nshedge if( shedge(i)>=0 )then ! solid line call pllsty(1) else ! broken line call pllsty(2) endif if( lclab .and. mod(i-1,clskip)==1 )then ! with label call pl_setcontlabelparam( 0.01D0, 0.6D0, clspace, 1) else ! without label call pl_setcontlabelparam( 0.01D0, 0.6D0, clspace, 0) endif sigdig = numsigdig( shedge(i) ) call pl_setcontlabelformat(4,sigdig) call plcont( zg , 1, nxc, 1, nyc, & & (/shedge(i)/), xg, yg ) enddo end subroutine plplot_contour ############################################################ # CODE ENDS HERE (Many thanks again for supporting FORTRAN!) ############################################################ This is a FORTRAN code which takes a 2-dimentional array and plot it with plcont, where I also use pl_setccontlabelparam to specify how far contour labels stand "off lines". In this specific case, I suppose that the best example would be Demo09-01: http://plplot.org/examples.php?demo=09 , , and I tried to ask if countour labels could be placed in line-break, e,g, : https://docs.generic-mapping-tools.org/6.3/gallery/ex13.html. Shozee > ----- Original Message ----- > > From: "Alan W. Irwin" <Ala...@gm...> > To: "koi...@ya..." <koi...@ya...> > Cc: "plp...@li..." <plp...@li...> > Date: 2022/01/18 火 13:32 > Subject: Re: [Plplot-general] Line break for plcont > > > On 2022-01-18 12:19+0900 koi...@ya... wrote: > > [...] > > There is one option I wish I could have in plplot: making a linebreak to put labels in between. > > > > To be precise, there may be two options. One is, make a line, put a white box on the line, then put numbers in. > > > > The other option is, literally break a line (draw two lines with some space) and put numbers in between. > > > > (Both look good to me). > > > > > > > > > > Hopefully anyone can spare some time to consider adding it or tell me how ? > > Hi Shozee: > > I am answering you on the assumption your subject line should have been "line break for PLplot" > since you did not mention plcont anywhere inside your email. > > If that assumption is correct I suggest you take a look at pllegend > which was designed to give users tremendous control over how text (and > graphics) are arranged within a legend (within a plot). Of course, > that enormous capability makes its API complex, but check the > [documentation of that > API](http://plplot.org/docbook-manual/plplot-html-5.15.0/pllegend.html) > to see whether that API might provide exactly what you need. That API > is demonstrated in a simplistic way in [example > 4](http://plplot.org/examples.php?demo=04) and [example > 26](http://plplot.org/examples.php?demo=26) which are useful to show > how to turn everything off other than the small subset of that API > that you need. That API is demonstrated in a more comprehensive way > in [example 33](http://plplot.org/examples.php?demo=33). > > Good luck and let us know how it goes! > > Alan > __________________________ > Alan W. Irwin > > Research affiliation with the Department of Physics and Astronomy, > University of Victoria, Victoria, BC, Canada. > > Programming affiliations with the FreeEOS equation-of-state > implementation for stellar interiors (freeeos.sf.net); the Time > Ephemerides project (timeephem.sf.net); PLplot scientific plotting > software package (plplot.org); the libLASi project > (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); > and the Linux Brochure Project (lbproject.sf.net). > __________________________ > > Linux-powered Science > __________________________ > |