The Origin Forum
File Exchange
Try Origin for Free
The Origin Forum
Home | Profile | Register | Active Topics | Members | Search | FAQ | Send File to Tech support
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum
 Origin Forum
 Turn Off X Axis In Graph With Python or Labtalk
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

spconway1987

11 Posts

Posted - 07/16/2015 :  10:11:11 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin): 2015 Sr2
Operating System: Windows 8

Hi,

I'm creating a column chart using Python and would like to know how to turn off the x axis whether through Python or Labtalk. I would like each row to be recognized as it's own bar and have the last cell in each row represent the height of each column.

Thanks!

jasonzhao

China
262 Posts

Posted - 07/16/2015 :  11:24:42 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

The following Labtalk Script can be used to remove the element of the X axis;


layer.x.showAxes=0;  //remove X axis
layer.x.showLabels=0;  //remove ticks label
label -r XB; //remove title



Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 07/16/2015 11:26:07 PM
Go to Top of Page

spconway1987

11 Posts

Posted - 07/17/2015 :  2:52:37 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
quote:
Originally posted by jasonzhao

Hello,

The following Labtalk Script can be used to remove the element of the X axis;


layer.x.showAxes=0;  //remove X axis
layer.x.showLabels=0;  //remove ticks label
label -r XB; //remove title



Best regards!
Jason
OriginLab Technical Service




Hi Jason,

Thanks for that block of code it was helpful. However, what I would like to do is have each row in my worksheet be represented by its own column in the graph. When I add the worksheet to a new DataRange and then add the DataRange to the graphlayer with AddPlot It is not adding the correct number of columns to the graph. I have 6 rows that I want to be represented by 6 columns and the last cell in each row will be the value of the column. However, when I create the graph I'm getting various number of columns.

Code:

gdata = PyOrigin.NewDataRange()
gdata.Add('X', predict, 0, -1, x) # x is last column index of sheet
graph = PyOrigin.CreatePage(3, "Graph", "Graph", 1)
PyOrigin.FindGraphLayer("Graph").AddPlot(gdata, 203)




I have a screenshot but it will not let me post right now due to the following error "An error happened during the request for the page: http://www.originlab.com/www/support/forum_image_upload.aspx
Please try again later. If this problem persists, please contact webmaster@originlab.com."

I will try to edit this post as soon as possible when I can upload the screenshot.
Go to Top of Page

jasonzhao

China
262 Posts

Posted - 07/20/2015 :  01:37:28 AM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Hello,

You can send your OPJ, with python code, and screenshot to tech@originlab.com for us to make a further check.

Please mention this link: http://www.originlab.com/forum/topic.asp?TOPIC_ID=21498
in your email.

Best regards!
Jason
OriginLab Technical Service

Edited by - jasonzhao on 07/20/2015 03:20:38 AM
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000