[Thread Prev][Thread Next][Index]
Re: [ferret_users] Strange bug in plot title with html features
- To: ferret_users@xxxxxxxx
- Subject: Re: [ferret_users] Strange bug in plot title with html features
- From: "Ansley C. Manke" <ansley.b.manke@xxxxxxxx>
- Date: Thu, 30 Apr 2020 09:55:39 -0700
- Arc-authentication-results: i=2; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=Xmqv4yuU; spf=pass (google.com: domain of ansley.b.manke@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=ansley.b.manke@xxxxxxxx; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=noaa.gov
- Arc-authentication-results: i=1; mx.google.com; dkim=pass header.i=@noaa.gov header.s=google header.b=Xmqv4yuU; spf=pass (google.com: domain of ansley.b.manke@xxxxxxxx designates 209.85.220.41 as permitted sender) smtp.mailfrom=ansley.b.manke@xxxxxxxx; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=noaa.gov
- Arc-message-signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-archive:list-help:list-post:list-id:mailing-list:precedence :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=AzmwkH5fpXopIxYxPEmhFCGucgbj24Nke7eN0W9YhB4=; b=lD0kXEr0xxULZE1JLlUg399r+NV7xZqs2Ufwg6x2ur+X8c+E1kgMwl87YhnN11BcQF V7EBnJHlf6ylh4GgnJNFDpKucDrIT36R/BigEOqkodz7ySie0LuBDsYFzCvu8rAiplZC uILASPLE1M/J+oLAOQb49lmpkKZnDrRw5Q9r/k5e46HC62x9zpcKEWSuyKRdkPBKmTR/ T71U+WJ1GtlMlKb7seumj5FF3afga0WCsz7Ss4Mkez4cb3x4L+K6OlLe71O5YJwhrWHr j7lcmmZKXLqBbOTtYZMULKdxsMWsEIESg+X9KkxiQf92nSYFPgZ964M9I0coFAkUSoS+ eCHA==
- Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:to:subject:dkim-signature; bh=AzmwkH5fpXopIxYxPEmhFCGucgbj24Nke7eN0W9YhB4=; b=a+XvaGriSThgEbh3YoOjoCTuHIyfQeeTmd0c6UVQp8YDpxDFEu+aDLAsH3GeAke1Rg S99JaqbcdRZyV6ek0u6AXwVJmtx79+FeZMHYpo3stlQXiB1Y4HEe/WyDnm9NXnjA97Hg vhG3r50pTYsLfF4rudb74dVDEulpOZgy7N6LmN7JIV7OZgZrpvzpWWxaV7OqRSif+K+8 2Ur8pg0hzd1sTe95a2FZZKTgQ0Mh0ARGD9gA+KuELmmlf5DMywzrdm7aCigURcHcYc3E 9amz+00S0knrKyUzFt15BM6M0+eGlDfvfRuPjGuet/HLE/ver7bWvF418Gpvn27VlTuK /ARA==
- Arc-seal: i=2; a=rsa-sha256; t=1588265744; cv=pass; d=google.com; s=arc-20160816; b=aaHKcpib2HGVS5/RfFgn/cvYyGEYtwPwN7iXNHjn9wMTszTKdLgA02aaYZ2Gyiyc1t B0M9jhfWva4WeMaJ5HSWhaB7s27Qt/inyZjaQu+Mgg3F2p4GjdtVXczsqtpk3Ve0zDhY kJcLw4DACGHCXpC3Upg9d+A/254f7SjtncrDzIUA0pmtSLcVyyCMls8WEQnZ/2dc9oXF B4T7Puc5b1nR2/gRNsFcpE6ZIwN1BBhxln5vdNUEhVObvubQHweBHZ+MFSg3VrpXdDst AH0tGVeskuwJM7P/Dt9RgAXhAGGHHovTU1FEY92+ohJ5jZ9BbizIHluAHaqotiEXME3/ AB/w==
- Arc-seal: i=1; a=rsa-sha256; t=1588265743; cv=none; d=google.com; s=arc-20160816; b=fJFMOSh2MHYu25CLLaTxD1p5+fjFCbrXEqdMnthXGuEswyim/RDg6ISkeMYlsirOw+ Uecg+RqAQvTiz0B4zxH8rBEf+gYTYG3oG0X5Ei8bMba7Os2NV2XbTTPRKMKXlP0MV4i9 bfKDaHRFHm2wWJk6OZI1h9KRZ+jFzbEEFlDeMSNfTTBOC0SEOFeWUhkzw0SRKmkHt1Gg WSA7Uun71owPbbe37Mfy5njPIxPhrRRnykAUZ9+/A2z1oCZfuP5KVmZtj3lmcfDXW5j6 YsJim/txI6SEk1SNgOnBeTAcrZYhxEm94ofN/tQ0i66ldY7aqNIVE+ooJl0du39Sjayk EteA==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=noaa.gov; s=google; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-language:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive; bh=AzmwkH5fpXopIxYxPEmhFCGucgbj24Nke7eN0W9YhB4=; b=JRmXwUO3BNugycKMIAKwnj+roWuYcyEcWyCr75bhp6HLCzoB3BhMBTLcbt+OKXRzbZ s/+63N8q7lP4ZINdY+FAiMnfMX9gcBKJGVOH5t3dvNK5glSBoqud2iDoKWutoPKrO7C1 Tv/AQyMjXCPWKhp3VbVX/irdC4VznNrpqoJlpag+yg5iX1hrQpp26s4qQZ+iE3lbCdHQ pgTUTGvVJAi2mKeDTMSgROs64FLR3oMF3QmE2xD/SB+IjdNkM41Tb9yTpTpb91TXP3Af LcL+NV5RHMMawdmLia3SU6jR2ACPhSSXkNdDSGnLJZQsARa9U8Q2hIBb8dNkMfg648go jlwA==
- In-reply-to: <866A5304-0AAF-4C18-A8E5-330C26199745@lsce.ipsl.fr>
- List-archive: <https://groups.google.com/a/noaa.gov/group/ferret_users/>
- List-help: <https://support.google.com/a/noaa.gov/bin/topic.py?topic=25838>, <mailto:ferret_users+help@noaa.gov>
- List-id: <ferret_users.noaa.gov>
- List-post: <https://groups.google.com/a/noaa.gov/group/ferret_users/post>, <mailto:ferret_users@noaa.gov>
- Mailing-list: list ferret_users@xxxxxxxx; contact ferret_users+owners@xxxxxxxx
- References: <866A5304-0AAF-4C18-A8E5-330C26199745@lsce.ipsl.fr>
- Sender: owner-ferret_users@xxxxxxxx
- User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:68.0) Gecko/20100101 Thunderbird/68.7.0
Hi Olivier,
Thank you for the report. My guess is that the code which
centers the text is not correctly taking into account the size of
the title with the subscript. It is making a calculation to do
that, but perhaps isn't getting this right with different fonts.
Just to verify we are seeing the same thing, try this script. Do
you see the amount of shifting shown in the attached plot?
SET TEXT/FONT=calibri/color=black
SET VIEW UL ; PLOT/TITLE="d18O text text
text" I[I=1:10] ! Title OK
SET VIEW UR ; PLOT/TITLE="d<sup>18</sup>O
text text text" I[I=1:10] ! Title shifted to the right
SET VIEW LL ;
PLOT/TITLE="<&delta><sup>18</sup>O text
text text" I[I=1:10] ! Title shifted to the right
SET VIEW LR ; PLOT/TITLE="<&delta>18O text text
text" I[I=1:10] ! Title OK
! viewports starting slightly higher.
! Draw labels without subscript to see the shift
define view/x=0:0.5/y=0.02:0.5 ll2
define view/x=0.5:1/y=0.02:0.5 lr2
define view/x=0:0.5/y=0.52:1 ul2
define view/x=0.5:1/y=0.52:1 ur2
set text/font=calibri/color=blue
SET VIEW UL2 ; PLOT/TITLE="d18O text text text"
SET VIEW UR2 ; PLOT/TITLE="d18O text text text"
SET VIEW LL2 ; PLOT/TITLE="d18O text text text"
SET VIEW LR2 ; PLOT/TITLE="d18O text text text"
On 4/29/2020 1:55 AM, Olivier Marti
wrote:
In the following script, some plots have a title
that is not centered, but shifted to the right. It happens when
a <sup> syntax is used.
Do you have the same problem ? And could you suggest
a workaround ?
(tested with pyferret 7.5 on MacOSX and on Linux)
Olivier
!
! Strange
behaviour ...
! The plot
title is shifted to the right when a syntax
<sup>foo</sup> is used
SET
TEXT/FONT=calibri
SET VIEW UL ;
PLOT/TITLE="d18O text text text" I[I=1:10] !
Title OK
SET VIEW UR ;
PLOT/TITLE="d<sup>18</sup>O text text text"
I[I=1:10] ! Title shifted to the right
SET VIEW LL ;
PLOT/TITLE="<&delta><sup>18</sup>O text
text text" I[I=1:10] ! Title shifted to the right
SET VIEW LR ;
PLOT/TITLE="<&delta>18O text text text"
I[I=1:10] ! Title OK
—
Olivier Marti - LSCE Bât
714 p. 1049
MERMAID Team
Normal situation : +33 1
69 08 77 27
Corona
lockdown : +33 6 45 36 43 74
--
Ansley Manke
Science Data Integration Group
NOAA Pacific Marine Environmental Laboratory
7600 Sand Point Way NE
Seattle WA 98115
I am currently teleworking and am available Tue-Wed-Thu.
Attachment:
titles.png
Description: PNG image
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement