On 2017-03-27 21:38-0500 AARON HEXAMER wrote:

> For lack of a better term ... I'm looking for a feature that could
place a text label in the viewport closest to a desired coordinate,
but without intersecting any plotted data nor being clipped by the
viewport bounds?  AFAICT, there is no API that does this.  I suppose
its probably non-trivial.  I'm wondering though if there is some
feature that could test for intersection/clipping before updating the
plot so I could provide an iterative method of placement.  Any
thoughts?

Hi Aaron:

I am sorry, but as far as I know we don't have such an API or a way to
test for intersection of a graphical element with any (previous)
graphical element.

> To understand the problem I'm trying to solve, see this post where
the GM and PM labels get clipped
(https://www.picotech.com/support/topic14311-120.html#p78941).  I
suppose I could also let the user configure label placement, but only
if there's no other practical way to automate it.

I took a look at that plot, and the fundamental issue is you are
trying to label two points with extremely long labels that get clipped
at the viewport boundary because the two points are close to the RHS
of the plot.  I suggest instead you mark those two points with
distinct single-glyph symbols (using plstring), and then use a legend
(the pllegend API for PLplot, see
<http://plplot.sourceforge.net/examples.php?demo=04> for an example)
to give additional details for each symbol.  In my opinion that method
is the ideal way to present all the information you plot now.

Thanks for your interest in PLplot.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

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.sf.net); 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
__________________________

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Plplot-general mailing list
Plplot-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/plplot-general

Reply via email to