I have thought of this might interesting to share. Register at
http://www.sagenb.org or try on your local Sage-notebook and using the following
# Simple example demonstrating how to interact with matplotlib directly.
# Comment plt.clf() to get the plots overlay in each update.
# Gokhan Sever & Harald Schilly (2010-01-24)
from scipy import stats
import numpy as np
import matplotlib.pyplot as plt
def plot_norm(loc=(0,(0,10)), scale=(1,(1,10))):
rv = stats.norm(loc, scale)
x = np.linspace(-10,10,1000)
A very easy to use example, also well-suited for learning and demonstration
Posted at: http://wiki.sagemath.org/interact/graphics#Interactwithmatplotlib
Have fun ;)
From: Jason Grout <jason-sage@cr...> - 2010-01-25 19:41:57
Gökhan Sever wrote:
> I have thought of this might interesting to share. Register at
> http://www.sagenb.org or try on your local Sage-notebook and using the following
A related example that lets you get the actual matplotlib figure from a
Sage graphic and play with it is here:
The thing we'd like to do now is be able to wrap matplotlib axes with
Sage Graphics objects (so someone can construct a matplotlib object and
then wrap it in a Sage Graphics instance to then do further stuff with
it in Sage). However, I think we need to resolve the issues involving
taking the axes from one figure and adding them to another figure; these
issues were brought up on the mailing list a while ago.
Get latest updates about Open Source Projects, Conferences and News.