Does MATLAB plotting accept matplotlib syntax now?

One of my students turned in some code and it threw a bunch of errors on my 2019b installation. When I was going through it they were basically using pyplot syntax to change the font size.
Instead of the name-value pairs,
title('Words!','FontSize',20)
They used key=value syntax like matplotlib
title('Words!',fontsize=20)
The code runs on their 2021a but not my 2019b.

 Respuesta aceptada

Kojiro Saito
Kojiro Saito el 4 de Jun. de 2021

0 votos

Yes, as written in R2021a release note, name=value syntax is supported from R2021a.

1 comentario

Adam L. Lambert
Adam L. Lambert el 4 de Jun. de 2021
Editada: Adam L. Lambert el 4 de Jun. de 2021
Thanks! I guess I could have read that but I just checked the documentation for title() and did not see anything.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Productos

Versión

R2019b

Preguntada:

el 4 de Jun. de 2021

Editada:

el 4 de Jun. de 2021

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by