Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

most MantidPlot commands related to plotting/annotating curves does not work #7988

Closed
abuts opened this issue May 17, 2013 · 1 comment
Closed
Assignees
Labels
Framework Issues and pull requests related to components in the Framework
Milestone

Comments

@abuts
Copy link
Member

abuts commented May 17, 2013

the page
http://www.mantidproject.org/MantidPlot:_1D_Plots_in_Python#The_plot_legend

describes the way to plot/annotate curves. Most examples provided on this page do not work.

there is the script illustrating this:

t = table("TableTest")
if t==None:
    t=newTable("TableTest",10,3)

for i in xrange(1,10):
      t.setCell(1,i,i)
      t.setCell(2,i,i*i)
      t.setCell(3,i,i*i*i)    

gr = graph("MyTest");
if gr == None :
    gr =  newGraph("MyTest",2,1,2) 

l=gr.layer(1)
l.setTitle("Flux/Frequency")
l.setAxisTitle(Layer.Bottom, "Frequency [Hz]")
l.setAxisTitle(Layer.Left, "Flux [n/s/cm^2]")


l.setAntialiasing()
#l.insertCurve(table("Table1"), "Table1_1", Layer.LineSymbols)

l.addCurves(t, (1,3), Layer.Line, 1, 4) # returns True on success
#       self.graphFlux.insertCurve(self.t, "Flux/Frequency_2", Layer.Scatter)        

legend = l.newLegend(str(4))        
#txt=legend.addText(str(4))
legend.setOrigin(5,15)

-- last command -- setOrigin is not available. Neither are the most commands provided on the page above.

Either description or code should change.

@abuts
Copy link
Member Author

abuts commented Jun 3, 2015

This issue was originally trac ticket 7142

@abuts abuts added the Framework Issues and pull requests related to components in the Framework label Jun 3, 2015
@abuts abuts added this to the Release 3.2 milestone Jun 3, 2015
@abuts abuts closed this as completed Jun 3, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Issues and pull requests related to components in the Framework
Projects
None yet
Development

No branches or pull requests

2 participants