Subject: [Viper-dev] Scaling of vector plots

From: Anders Logg <[email-masked]>
Date: Fri, 21 Nov 2008 20:22:20 +0100

When plotting a vector field in Viper with rescale=True, Viper seems
to rescale the whole image to make it fit into the plot window,
instead of just scaling the arrows and keep the geometry fixed.

This means that if one plots a vector field which is initially small
and then grows, the arrows will remain of constant size and the domain
will become smaller and smaller.

Would it be possible to keep the domain fixed and instead scale the
arrows (but make sure that the colorbar shows the correct values)?

-- 
Anders

---

From: "Ola Skavhaug" <[email-masked]>
Date: Mon, 24 Nov 2008 10:34:02 +0100

> arrows (but make sure that the colorbar shows the correct values)?

Could you point me to an example of this?
The rescale option is really a simple call to VTK. What you suggest
might be more demanding. To make sure I don't implement anything
silly, an example would be helpful.

Ola

> --
> Anders
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.9 (GNU/Linux)
>
> iEYEARECAAYFAkknCmwACgkQTuwUCDsYZdFu/wCggyFxHaOw01gnXtLpKQIATGIS
> 2hYAnjsCXKlrr4xFUAr+T2ndUoVtjCSz
> =eyL5
> -----END PGP SIGNATURE-----
>
> _______________________________________________
> Viper-dev mailing list
> [email-masked]
> http://fenics.org/mailman/listinfo/viper-dev
>
>

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Mon, 24 Nov 2008 14:07:58 +0100

> silly, an example would be helpful.

Here is an example.

The final plot looks like a rocket, when it is fact a nice parabolic
velocity profile like the initial plot.

-- 
Anders

---

From: "Ola Skavhaug" <[email-masked]>
Date: Mon, 24 Nov 2008 15:24:11 +0100

>> silly, an example would be helpful.

I've tried to fix it. Pull from hg and inspect the new solution (only
rescales vectors when rescale=True).

Ola

> iEYEARECAAYFAkkqpy0ACgkQTuwUCDsYZdEuqwCghVu6RObeIjinKaC0KsF/3gOJ
> MhoAnRhBfbq1tA01QgFp34HrVT+JOGzM
> =F/Nc

-- 
Ola Skavhaug

---

From: Anders Logg <[email-masked]>
Date: Mon, 24 Nov 2008 15:50:30 +0100

> rescales vectors when rescale=True).

Looks perfect! Thanks.

-- 
Anders