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
 All Forums
 Origin Forum
 Origin Forum
 Turn Off X Axis In Graph With Python or Labtalk

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

Screensize:
UserName:
Password:
Anti-Spam Code:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkUpload FileInsert Image Insert CodeInsert QuoteInsert List
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
spconway1987 Posted - 07/16/2015 : 10:11:11 PM
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!
3   L A T E S T    R E P L I E S    (Newest First)
jasonzhao Posted - 07/20/2015 : 01:37:28 AM
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
spconway1987 Posted - 07/17/2015 : 2:52:37 PM
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.
jasonzhao Posted - 07/16/2015 : 11:24:42 PM
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

The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000