Skip to Content.
Sympa Menu

texmacs-users - [texmacs-users] matplolib inside [was Re: jupyter…]

Subject: mailing-list for TeXmacs Users

List archive

Chronological Thread  
  • From: vincent douce <address@concealed>
  • To: address@concealed
  • Subject: [texmacs-users] matplolib inside [was Re: jupyter…]
  • Date: Thu, 24 Oct 2024 13:45:38 +0200


<<< text/html; charset=us-ascii: Unrecognized >>>

Attachment: TP3-mon_corrige.tm
Description: Binary data


<<< text/html; charset=us-ascii: Unrecognized >>>

Attachment: matplotlib-texmacs.tm
Description: Binary data

hello
here a matplotlib that works and the picture appears inside the tm document (file matplotlib-texmacs.tm)
and a matplotlib that does not appear at all (file TP3)
i can’t manage to understand why
Vincent

Le 15 oct. 2024 à 18:54, Henri Girard <address@concealed> a écrit :

here it is :

%matplotlib notebook
import matplotlib.pyplot as plt

import matplotlib
import numpy as np
import matplotlib.pyplot as plt
%matplotlib inline 

theta=np.linspace(0,2*np.pi,100)
x=np.cos(theta)
y=np.sin(theta)
fig,ax=plt.subplots()
ax.plot(x,y)
ax.set_aspect(1)
plt.show

I got a blue circle

Next time put le python code because from an image I have to write it and I am not a good typist !

best

Henri


Le 15/10/2024 à 17:26, vincent douce a écrit :
thanks Henri
the % is not recognized



<GraphiqueCollé-8.png>

Le 15 oct. 2024 à 15:10, Henri Girard <address@concealed> a écrit :

Sorry for not being clear :

In Jupyter notebook with python if we want a graphic embeded one just write at begining

%matplotlib inline

and all pictures will be inside jupyter and not outside


Le 15/10/2024 à 10:36, vincent douce a écrit :
hello Henri
what do you mean ?

Le 15 oct. 2024 à 10:13, Henri Girard <address@concealed> a écrit :

have you tried %matplolib inline ?

Le 15/10/2024 à 10:11, vincent douce a écrit :
hello i have made a trial


%matplolib inline



my question are :

- créate a shortcut for « inserting session python » : maybe with my-init-texmacs ? and for « evaluate all », « evaluate below »…
- possible to cancel the display of >>> and instead change the typography of the chunks ? grey background + size of the font more tiny ?
- some difficulties when inserting a chunk, to put the cursor after the chunk


remarks :

- summary : advantage to TeXmacs…
- pdf version : galactic advantage to TeXmacs…

other question :


(screenshot)
if i matplotlib some curve inside a python session : how to get the picture not in an external windows, but inside the TeXmacs document ?
Vincent

Vincent






Archive powered by MHonArc 2.6.24.

Top of Page