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 for Programming
 Forum for Python
 Set theme of Plot

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
jy1u18@soton.ac.uk Posted - 07/04/2022 : 11:52:48 AM
I'm trying to use the originpro module to plot and change the theme of a series of graphs. But Plot.shapelist does not seem to be working. I do have a theme saved as "AppCurve-CV", but it does not apply that to the Plot. Any help?

Many thanks,
Christopher


import originpro as op
import numpy as np
import pandas as pd

wkslist=np.arange(1,2).tolist()
nameDic={1:'50Hz',2:'60Hz',3:'80Hz',4:'100Hz',5:'150Hz',6:'200Hz',7:'500Hz',8:'None'}

for wksnum in wkslist:
    pg=op.new_graph(f'20220704-ECLCVCheck-{nameDic[wksnum]}')
    lyr=pg[0]
    wks=op.find_sheet('w',f'Book{wksnum}')
    plt=lyr.add_plot(wks,1,0,type='y')
    plt.shapelist='AppCurve-CV' #HERE!!!
    lyr.rescale()
6   L A T E S T    R E P L I E S    (Newest First)
minimax Posted - 07/06/2022 : 10:36:58 PM
"shapelist" command is specific to scatter plot's symbol shape only and not applicable to your case.

And currently there is no native python interface to apply a whole theme (including plot, axis etc.).

You may try Labtalk script for now, like

pg=op.new_graph(f'20220704-ECLCVCheck-{nameDic[wksnum]}')
lyr=pg[0]
wks=op.find_sheet('w',f'Book{wksnum}')
plt=lyr.add_plot(wks,1,0,type='y')

#themeApply2g is an XF which applies theme onto graph window
pg.lt_exec(f'themeApply2g theme:="AppCurve-CV";')
jy1u18@soton.ac.uk Posted - 07/06/2022 : 07:17:47 AM
quote:
Originally posted by minimax

Hi Christopher,

I may not make myself clear.

shapelist command works on a set of scatter shapes.

And I wonder what is the scatter shapes inside your theme file.

A typical shape theme looks like following





I thought it allows me to apply the whole theme to the graph no?
Or it just applys the shapelist of the theme?
In that case, that makes sense, cuz I think there's no shapelist, there is only one shape.

Is there a function that allows me to apply the whole theme? color, label, font, scale, ticks and everything?

Kind regards,
Christopher
minimax Posted - 07/05/2022 : 11:03:42 PM
Hi Christopher,

I may not make myself clear.

shapelist command works on a set of scatter shapes.

And I wonder what is the scatter shapes inside your theme file.

A typical shape theme looks like following

jy1u18@soton.ac.uk Posted - 07/05/2022 : 06:25:30 AM
quote:
Originally posted by minimax

Hi Christopher,

What shapes are used in your theme file?


Hi,

it's line and scatter
minimax Posted - 07/05/2022 : 02:56:58 AM
Hi Christopher,

What shapes are used in your theme file?
minimax Posted - 07/04/2022 : 11:15:47 PM
It seems like a bug and we will look into it (track ID: ORG-25456)

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