Better error check on Python functions


Version: 2023

Type: Features

Category: Programming

Subcategory: Python

Jira: ORG-25825


import originpro as op
op.new_graph()
if (not op.save(r'D:/'+'Nw.opju')):
    print ('saving failed')
else:
    print ('saving succeeded')

py plot.colormap failed to apply palette file to grouped plots increment colors


Version: 2023

Type: Bug Fixes

Category: Programming

Subcategory: Python

Jira: ORG-25825


1.Run following python code.

import os
import originpro as op
wks = op.new_sheet()
wks.from_file(os.path.join(op.path('e'), 'Samples', 'Graphing', 'Group.dat'))
graph = op.new_graph(template='line')
gl=graph[0]
plot = gl.add_plot(f'{wks.lt_range()}!(?,1:end)')
gl.group()
plot.colormap = 'Rainbow.pal'
gl.rescale()
  1. Open Plot Details dialog, go to Line tab.

==> The color node is not set as Rainbow palette.

Fixed in Origin 2023