[Thread Prev][Thread Next][Index]

Re: [ferret_users] Re: [ferret_users] pyferret aliasing in jupyter notebooks



Hi,

I have released a new version of ferretmagic to expose a new option
called --outline to control the behaviour proposed by pyferret from the qualifier /outiline=

/OUTLINE=
When drawing color-filled rectangles and other polygons, this option allows one to specify the thickness of a outline to be drawn around each polygon. The color of the outline will be the same as the fill color. The main purpose of this option is to provide a work-around fix to some PostScript and PDF viewers that show thin white lines in FILL and SHADE plots. Typically only a very small value (0.05) is needed for this fix. If a value of zero is given, these outlines will not be drawn. The default behavior is to not draw these outlines.

By using a right value (to be experimented) you can rid off the thin horizontal lines
that appear on a shade plot.

with the outline option


To update ferretmagic, reinstall ferretmagic type:
pip install --upgrade ferretmagic

You should get the last release tagged 20200603
https://pypi.org/manage/project/ferretmagic/releases/

Happy ferreting, pyferreting, notebook pyferreting.
Patrick

--
Data Analysis and Visualization Engineer / Project Manager
LSCE/IPSL, CEA-CNRS-UVSQ laboratory
LSCE - Climate and Environment Sciences Laboratory
IPSL - Institut Pierre Simon Laplace
--


De: "Pierre Sepulchre" <pierre.sepulchre@xxxxxxxxxxxx>
À: "ferret users" <ferret_users@xxxxxxxx>
Envoyé: Vendredi 29 Mai 2020 15:38:21
Objet: Re: [ferret_users] Re: [ferret_users] pyferret aliasing in jupyter notebooks

Hi Paulo,

I think so, for now.

But actually, the problem is not that bad. pyferret+ferretmagic still make very nice figures in jupyter notebooks.

For a taste, you'll find a link to an interactive notebook here :

https://zenodo.org/record/3549652

Pierre


Le 29/05/2020 à 15:12, Paulo B. Oliveira a écrit :

Hi, 

Thank you Pierre and Patrick for sharing your experience with ferret and jupyter, and Patrick for ferretmagic.

I use ferret for a long time, but I'm just starting with jupyter. If I understood correctly, the only way to avoid the horizontal lines is by calling pyferret externally ?

On Fri, 29 May 2020 11:07:39 +0200 (CEST), Patrick Brockmann wrote:

Hi Pierre,
Indeed I can see some horizontal lines in the example you gave.
But by digging a little bit more into the problem, I can reduce it to a
simple call (that is indeed beneath the ferretmagic code).
$ cat simple.jnl
shade i[i=1:100]*j[j=1:100]*0
frame/xpixel=800/file=tyty.png/format=PNG
 
$ pyferret -script simple.jnl
produces a correct image ok.png
 
whereas
$ pyferret -unmapped -script simple.jnl
produces a aliased image (horizontal lines are visible) aliased.png
Tested with 7.5 pyferret release.
Regards
Patrick
 
--
Data Analysis and Visualization Engineer / Project Manager
LSCE/IPSL, CEA-CNRS-UVSQ laboratory
LSCE - Climate and Environment Sciences Laboratory
IPSL - Institut Pierre Simon Laplace
--

De: "Pierre Sepulchre"
À: "ferret users"
Envoyé: Jeudi 28 Mai 2020 23:10:03
Objet: [ferret_users] pyferret aliasing in jupyter notebooks

Dear all,

I am using pyferret v7.43/python3.6 in jupyter notebooks, within jupyter-lab and with ferretmagic extension, on macOS high sierra.

I realized that sometimes plotting with shade/ led to "aliased" maps, i.e. with unesthetic horizontal lines starting from both sides of the map.

However running the exact same command in a terminal (i.e. not in a notebook) provides a nice plot !

Playing with set window/noantialiasing does not improve much, but I noticed that changing the window aspect in the notebook, either through the use of "%ferret -s X,Y" parameters or with the set window /aspect, would change the location of the horizontal bars.

I would be grateful if someone had an hint to solve this issue.

I provide the examples here :

https://sharebox.lsce.ipsl.fr/index.php/s/QleW9tCk7HSYxhT

All the best,

Pierre

--

CNRS/Laboratoire des Sciences du Climat et de l'Environnement, Gif-sur-Yvette, France
tel : +33 (0) 1 69 08 65 49
What I am working on
twitter: @PierreSepulchre
github: psepulchre

--

CNRS/Laboratoire des Sciences du Climat et de l'Environnement, Gif-sur-Yvette, France
tel : +33 (0) 1 69 08 65 49
What I am working on
twitter: @PierreSepulchre
github: psepulchre


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement