Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

-Top Features

...

Feature

...

How to

...

Python improvements

-Top Features

Feature

How to

Python improvements

We have introduced a new originpro package for easy access to Origin from Python. This package works on a higher level, providing easy access to workbooks, matrices and graphs with very little code. The package also provides higher level access to data frames and numpy arrays.

Several sample Origin projects have been added under \Samples\Python sub folder. These samples have Python code attached as .py files in the project.

View documentation including detailed reference for the orignipro package.

Improvements in Beta2:

Excel like formula bar

  • Read current cell contents. Useful for cell with long text.

  • Enter column formula when column header is selected.

  • Enter cell formula when a cell is selected.

  • Hunt to define range. E.g. with B1 cell selected, in formular bar, enter =mean(, then drag from A1 to A10, the formula will show =mean(A1:A10, then user can enter ) and press Enter key to finish the formula.

Mini toolbar Improvements

Mini toolbars for text label, legend, color scale, bubble scale, and graphic objects are improved.

Improvements in Beta2:

Mini toolbar for tick label table (In Progress)

Mini toolbar button to flip colormap

Mini toolbar for Parallel Plot Axis

Image RemovedImage Added

System Variable for increment steps on Mini toolbar

Color Palette Improvements

Drag and drop palette types from other popular software.

...

JIRA

SUMMARY

DETAILS

ORG-20629

Improvement mini toolbar for legend – Inprogress

  • Mini toolbar for legend related features

  • Mini toolbar for legend symbols

  • Mini toolbar for color scale

  • Mini toolbar for bubble scale

ORG-21938

Rotate line, arrow, rectangle, etc. graphic objects with specified angle

  • Rotate dropdown list is added on Dimensions tab of Object Properties dialog.

  • Rotate clockwise and counter-clockwise buttons are added on mini toolbar.

ORG-22020

Applying Formatting to button for data label mini toolbar

Support Apply Formatting to This Layer/Window for data label

ORG-21885

Support Different Label Source for Each Plot of Grouped 3D plot

Implemented in Origin 2021.

ORG-5076

Tick Label Alignment support

ORG-21646

Mini toolbar for Tick Label Table (In Progress) - Beta2

ORG-21646

Mini toolbar button to flip colormap – Beta2

ORG-21646

Mini toolbar for Parallel Plot Axis – Beta2

ORG-22043

System Variable for increment steps on Mini toolbar

...

JIRA

SUMMARY

DETAILS

ORG-20778

Excel like pi product function

double product(vector vd)

E.g. column A is filled with 2, 3, 4, 5

In B1 cell, enter = product(A) will 120, which is 2*3*4*5.

ORG-21992

Excel like LET function

Easier to write complex formulas, by making it possible to declare and assign values to variables inside a formula

LET(name1, exp1, [name2…], [exp2…], calculation)

exp1 is resolved and assigned to name1, exp2 is resolved and assigned to name2, then assign names to calculation for result. 

LET(x, 1, x+1) -> 2

LET(sum, total(A), n, count(A), sum/n)

ORG-13898

Command Window

support mouse wheel zoom, more support on auto complete

ORG-21926

Introduce new LabTalk command to update pending locks

Code Block
run -p aub;//active book
run -p auw;//active sheet
run -p aubd;//active book and all its descendants
run -p auwd;//active sheet and all its descendants

ORG-21587

LabTalk Access to Dash Definition at Plot Level

Syntax: set name -ldf value

Code Block
set %c -ldf  "5 20 10";

ORG-19233

GetN supports dataset elements

E.g.

dataset values;
values.setsize(3);
getn (Value 1) values[1] (Value 2) values[2] (Value 3) values[3];

ORG-22214

LT Labtalk control of Box Plots – Beta2

layer.plot1.boxchart.line=1,2,3; //show lines in box chart, 1=median,2=mean or 3 both

layer.plot1.boxchart.label=1,2,3;//show label of line, 1=median,2=mean or 3 both

layer.plot.label.font=1; //label font

layer.plot1.label.fsize=20; //label font size

layer.plot1.label.color=2; //label color based on color list, e.g. 1=black, 2=red, etc.

Python

...

JIRA

...

SUMMARY

...

DETAILS

...

ORG-22062, ORG-21995, ORG-22031, ORG-22107

Introduce originpro module

get/set between pandas DataFrame and Origin worksheet, matrix, graph etc.

...

https://www.originlab.com/python/doc/originpro/annotated.html

Code Block
import pandas as pd
import originpro as op
wks=op.find_wsheet()
df = wks.to_df()

wks = op.new_wsheet( 'Test Category' )
wks.from_df( df )

...

ORG-20980

...

Update preshipped Python version

...

upgrade Python to 3.8.3

...

ORG-21988, ORG-11812

...

menu access

...

  1. Under menu Connectivity add new menu Python IDE in Code Builder.

  2. In Code Builder, add menu Python Packages under Tools.

  3. Start Debug button on toolbar (F5) to run Python file.

...

ORG-22024

...

Wrap text in Python Console

...

Allow auto wrapping for dir command’s output in Python Console.

...

ORG-22046

...

Add return value for some Python Object

...

method like GetNumProp, SetNumProp, DoMethod etc. now has return value.

...

ORG-22075

...

Remove Python 2 from installation

...

Stop supporting Python 2.

...

ORG-21993

...

Support Python PIP command

...

All pip commands are supported in LabTalk now.

For example, you can use following command to install numpy package directly.

Code Block
pip install numpy;

...

ORG-22049

...

Install Packages from Code Builder Py Editor Tools menu

...

Add Python Packages tool to install/uninstall internal python packages.

In Code Builder, select Tools: Python Packages…

...

ORG-22070

...

OC to call Python functions

OC supports calling Python functions. By default the py file should be placed in the same folder as the c/cpp or XF file, and the name of the py file has to be origin.py.
To change that, you need to

  1. to change working directory

Code Block
Python.OCWD$;//OC Working Directory

2. to change file name(independent of 1)

Code Block
Python.OCWF$;//OC Working Filename

...

ORG-22239

...

Beta Tester Feedbacks -- show Python print immediately

Added a system variable @PYO to control if show Python print immediately for Embedded Python.

Code Block
@PYO=1(default):immediate output
@PYO=0:output at the end

For example:

Code Block
import PyOrigin as po
print('before')
po.LT_execute('typ hi')
print('after')

if @PYO=1, will output as

Code Block
before
hi
after

if @PYO=0, will output as

Code Block
hi
before
after

OC

ORG-21941

code to download color palette from the internet

Added following OC function to download color palette. If file name arg is NULL or empty then the downloaded palette is installed.

int download_palette(LPCSTR lpcszURL, LPCSTR lpcszPALfilename)

At this time it can convert the following:

  • Scribus (.xml) (XML)

  • Office Color Table (.soc) (XML)

  • CorelDraw and Corel PhotoPaint (.xml) (XML)

  • Adobe Color (.aco) (Binary)

  • Adobe Color Table (.act) (Binary)

  • Adobe Swatch Exchange (.ase) (binary)

  • JASC PaintShopPro (.pal) (Text)

Code Builder

ORG-22100

Code Builder Shortcut Key Need VS like Ctrl+K Ctrl+C support

Update some Code Builder Shortcut Keys:

  1.  Tools: Customize(Ctrl+K, Ctrl+T)

  2. Debug: Execute Current Section(Ctrl+K, Ctrl+S)

  3. Debug: Execute Selected Lines(Ctrl+K, Ctrl+L)

  4. Edit: Comment(Ctrl+K,Ctrl+C)

  5. Edit-Uncomment(Ctrl+K,Ctrl+U)

  6. Edit: Go to Matching Brace(Ctrl+K,Ctrl+B)

ORG-22023

Support debug Python file

 Support debug Python file in Code Builder

General

JIRA

SUMMARY

DETAILS

ORG-21848, ORG-3958

Range String Builder dialog updates

Clearer labels and contexts, update menu entry name as Custom...

ORG-20942

Main Menu Rework

  1. App Center menu is moved under Tools main menu.

  2. Training Videos, Graph Gallery and Open Folder: Sample Folder are added under Help main menu.

  3. Help: View Origin Info menu is removed.

  4. Social main menu is added:

  5. Image Removed

Analysis

JIRA

SUMMARY

DETAILS

ORG-22170

Moving Average Functions NANUM (Missing value) Ignore or Zero Issues

Support different ways to treat missing value in the following functions: movavg, tmovavg and movcoef.

New option “missing“ is introduced:

  • 0: omit missing values from the calculation by default which is same as before

  • 1. include missing values in the calculation

  • 2. omit missing values from the calculation, but keep missing in the output

ORG-21947

Improvement on Operation Lock tooltip

  • Shows input data range.

  • Shows with better data range info.

  • Shows main range info instead for secondary lock.

  • Change background color of tooltip for locks on worksheet for better visualizing.

  • For Set Column Value operation, shows formula and input range info in tooltip. And when user select the F(x) cell, the before formula script will be shown in the status bar if exists.

ORG-21642

Average Multiple Curves with Different X Ranges Issue

Adding new option “No Extrapolation”:

  1. Only available when Averaged X is set to Full X RangeCustom, and Follow Curve Trace.

    1. Determines whether to extrapolate the curves when the input curves have different X ranges.

ORG-19877

Support set sampling interval on locked columns

Allow set sampling interval on locked column now.

ORG-21964

Peak Analyzer default theme setting changes

2 choices Enable Linear Constraints Status and Constraints change to check by default

ORG-22091

GCAS function has no "abs"

“abs“ in the GCAS function is not necessary and so it’s removed now.

Worksheet

JIRA

SUMMARY

DETAILS

ORG-21112

Data Formatting Mini Toolbar for Worksheet

Add new mini toolbars for easily customize the number of digits, date, and time format.

Image Removed

ORG-21720

Redo wTranspose XF tool

In the past, output of wtranspose maybe problematic when directly use as anlaysis input. Now, this should not be a problem anymore.

Statistics

...

JIRA

...

SUMMARY

...

DETAILS

...

ORG-21828

...

Statistics on Rows support multiple sheets as input

...

Origin 2021 implemented it.

Matrix

JIRA

SUMMARY

DETAILS

ORG-21179

More Shapes added to extract data from Matrix – Beta2

In Image mode of matrix (View: Image Mode), user can use rectangle, circle, polygon, region tool to define region of interest and extract the data there.

Image RemovedImage Removed
 %c -ldf  "5 20 10";

ORG-19233

GetN supports dataset elements

E.g.

dataset values;
values.setsize(3);
getn (Value 1) values[1] (Value 2) values[2] (Value 3) values[3];

ORG-22214

LT Labtalk control of Box Plots – Beta2

layer.plot1.boxchart.line=1,2,3; //show lines in box chart, 1=median,2=mean or 3 both

layer.plot1.boxchart.label=1,2,3;//show label of line, 1=median,2=mean or 3 both

layer.plot.label.font=1; //label font

layer.plot1.label.fsize=20; //label font size

layer.plot1.label.color=2; //label color based on color list, e.g. 1=black, 2=red, etc.

Python

JIRA

SUMMARY

DETAILS

ORG-22062, ORG-21995, ORG-22031, ORG-22107

Introduce originpro module

get/set between pandas DataFrame and Origin worksheet, matrix, graph etc.

https://www.originlab.com/python/doc/originpro/annotated.html

Code Block
import pandas as pd
import originpro as op
wks=op.find_wsheet()
df = wks.to_df()

wks = op.new_wsheet( 'Test Category' )
wks.from_df( df )

ORG-20980

Update preshipped Python version

upgrade Python to 3.8.3

ORG-21988, ORG-11812

menu access

  1. Under menu Connectivity add new menu Python IDE in Code Builder.

  2. In Code Builder, add menu Python Packages under Tools.

  3. Start Debug button on toolbar (F5) to run Python file.

ORG-22024

Wrap text in Python Console

Allow auto wrapping for dir command’s output in Python Console.

ORG-22046

Add return value for some Python Object

method like GetNumProp, SetNumProp, DoMethod etc. now has return value.

ORG-22075

Remove Python 2 from installation

Stop supporting Python 2.

ORG-21993

Support Python PIP command

All pip commands are supported in LabTalk now.

For example, you can use following command to install numpy package directly.

Code Block
pip install numpy;

ORG-22049

Install Packages from Code Builder Py Editor Tools menu

Add Python Packages tool to install/uninstall internal python packages.

In Code Builder, select Tools: Python Packages…

ORG-22070

OC to call Python functions

OC supports calling Python functions. By default the py file should be placed in the same folder as the c/cpp or XF file, and the name of the py file has to be origin.py.
To change that, you need to

  1. to change working directory

Code Block
Python.OCWD$;//OC Working Directory

2. to change file name(independent of 1)

Code Block
Python.OCWF$;//OC Working Filename

ORG-22239

Beta Tester Feedbacks -- show Python print immediately

Added a system variable @PYO to control if show Python print immediately for Embedded Python.

Code Block
@PYO=1(default):immediate output
@PYO=0:output at the end

For example:

Code Block
import PyOrigin as po
print('before')
po.LT_execute('typ hi')
print('after')

if @PYO=1, will output as

Code Block
before
hi
after

if @PYO=0, will output as

Code Block
hi
before
after

OC

ORG-21941

code to download color palette from the internet

Added following OC function to download color palette. If file name arg is NULL or empty then the downloaded palette is installed.

int download_palette(LPCSTR lpcszURL, LPCSTR lpcszPALfilename)

At this time it can convert the following:

  • Scribus (.xml) (XML)

  • Office Color Table (.soc) (XML)

  • CorelDraw and Corel PhotoPaint (.xml) (XML)

  • Adobe Color (.aco) (Binary)

  • Adobe Color Table (.act) (Binary)

  • Adobe Swatch Exchange (.ase) (binary)

  • JASC PaintShopPro (.pal) (Text)

Code Builder

ORG-22100

Code Builder Shortcut Key Need VS like Ctrl+K Ctrl+C support

Update some Code Builder Shortcut Keys:

  1.  Tools: Customize(Ctrl+K, Ctrl+T)

  2. Debug: Execute Current Section(Ctrl+K, Ctrl+S)

  3. Debug: Execute Selected Lines(Ctrl+K, Ctrl+L)

  4. Edit: Comment(Ctrl+K,Ctrl+C)

  5. Edit-Uncomment(Ctrl+K,Ctrl+U)

  6. Edit: Go to Matching Brace(Ctrl+K,Ctrl+B)

ORG-22023

Support debug Python file

 Support debug Python file in Code Builder

General

JIRA

SUMMARY

DETAILS

ORG-21848, ORG-3958

Range String Builder dialog updates

Clearer labels and contexts, update menu entry name as Custom...

ORG-20942

Main Menu Rework

Improvements in Beta2:

  1. App Center menu is moved under Tools main menu.

  2. Training Videos, Graph Gallery and Open Folder: Sample Folder are added under Help main menu.

  3. Help: View Origin Info menu is removed.

  4. Social main menu is added:

  5. Image Added

Analysis

JIRA

SUMMARY

DETAILS

ORG-22170

Moving Average Functions NANUM (Missing value) Ignore or Zero Issues

Support different ways to treat missing value in the following functions: movavg, tmovavg and movcoef.

New option “missing“ is introduced:

  • 0: omit missing values from the calculation by default which is same as before

  • 1. include missing values in the calculation

  • 2. omit missing values from the calculation, but keep missing in the output

ORG-21947

Improvement on Operation Lock tooltip

  • Shows input data range.

  • Shows with better data range info.

  • Shows main range info instead for secondary lock.

  • Change background color of tooltip for locks on worksheet for better visualizing.

  • For Set Column Value operation, shows formula and input range info in tooltip. And when user select the F(x) cell, the before formula script will be shown in the status bar if exists.

ORG-21642

Average Multiple Curves with Different X Ranges Issue

Adding new option “No Extrapolation”:

  1. Only available when Averaged X is set to Full X RangeCustom, and Follow Curve Trace.

    1. Determines whether to extrapolate the curves when the input curves have different X ranges.

ORG-19877

Support set sampling interval on locked columns

Allow set sampling interval on locked column now.

ORG-21964

Peak Analyzer default theme setting changes

2 choices Enable Linear Constraints Status and Constraints change to check by default

ORG-22091

GCAS function has no "abs"

“abs“ in the GCAS function is not necessary and so it’s removed now. - Beta2:

Worksheet

JIRA

SUMMARY

DETAILS

ORG-21112

Data Formatting Mini Toolbar for Worksheet

Add new mini toolbars for easily customize the number of digits, date, and time format.

Image Added

ORG-21720

Redo wTranspose XF tool

In the past, output of wtranspose maybe problematic when directly use as anlaysis input. Now, this should not be a problem anymore.

Statistics

JIRA

SUMMARY

DETAILS

ORG-21828

Statistics on Rows support multiple sheets as input

Origin 2021 implemented it.

Matrix

JIRA

SUMMARY

DETAILS

ORG-21179

More Shapes added to extract data from Matrix – Beta2

In Image mode of matrix (View: Image Mode), user can use rectangle, circle, polygon, region tool to define region of interest and extract the data there.

Image AddedImage Added

App

JIRA

SUMMARY

DETAILS

ORG-21851

Let Customers to choose download new app xml

In origin2020b, origin will download new app xml when App center dialog is opened if new app info comes. it is not friendly since it takes more or less 10s to open app center dialog.

In origin2021, user can download