Hello, 

You're using OpenTURNS from anaconda which unfortunately isn't built for 
graphing using the old R interface (to be deprecated), but: 

- You can use the matplotlib module to plot even nicer graphs: 
from openturns.viewer import View 
View( pdfLoiE ).save(' distributionE.pdf' ) 
View( pdfLoiE ).show() 

- Or install R, and tell OpenTURNS where to find the interpreter your script: 
conda install -c r r-base 
ResourceMap.Set('R-executable', ' /home/francois/anaconda2/ bin/R') 

j 

> De: "Francois Sanson" <[email protected]>
> À: "users" <[email protected]>
> Envoyé: Mardi 22 Novembre 2016 17:50:35
> Objet: [ot-users] plot display issues

> Hi openturns users,

> I am facing a problem when ploting stuff in openturns. In particular when I 
> run
> this minimal example taken from example 1 : deviation of a cantilever beam

> from openturns import *
> distributionE = Beta(0.93, 3.2, 2.8e7, 4.8e7)
> pdfLoiE = distributionE.drawPDF()
> # Change the legend
> draw_E = pdfLoiE.getDrawable(0)
> draw_E.setLegend("Beta(0.93, 3.2, 2.8e7, 4.8e7)")
> pdfLoiE.setDrawable(draw_E,0)
> # Change the title
> pdfLoiE.setTitle("PDF of E")
> pdfLoiE.draw("distributionE_pdf", 640, 480)

> I get

> RuntimeError Traceback (most recent call last)
> <ipython-input-10-d23f041bd8eb> in <module>()
> ----> 1 pdfLoiE.draw("distributionE_pdf", 640, 480)

> /home/francois/anaconda2/lib/python2.7/site-packages/openturns/graph.pyc in
> draw(self, *args)
> 4295 Number of pixels fixing the height of the Graph, default value=480.
> 4296 """
> -> 4297 return _graph.Graph_draw(self, *args)
> 4298
> 4299

> RuntimeError: InternalException : GraphImplementation: error trying to 
> execute R
> command=R_EXECUTABLE-NOTFOUND --no-save --silent < "/tmp/tmp_graph.R.U7TQC7" >
> /dev/null 2>&1

> Do you have any ideas ?

> Thanks a lot

> Francois

> _______________________________________________
> OpenTURNS users mailing list
> [email protected]
> http://openturns.org/mailman/listinfo/users
_______________________________________________
OpenTURNS users mailing list
[email protected]
http://openturns.org/mailman/listinfo/users

Reply via email to