Origin Ver: 2022 SR1
Operating System: Win 10
-------------------------------------------------------
Hi, I'm trying to create a plot with grouped data and then apply a color palette (rainbow) to it (with increment binned/stretched). I fail at the first step, i.e. selecting the colormap. When I select a increment list ('Candy', 'Fire', 'Classic') the colors of the plot (plot.colormap) do change, but if I select any color palette ('Rainbow.pal', 'Maple.pal') the color of the plot doesn't change. According to the documentation of originpro.graph.Plot.colormap this should be working.
Code used:
import originpro as op
# Start a new origin project
op.new()
# Choose whether Origin should be visible or not (default = True)
op.set_show(True)
# Create grouped data set
x = np.linspace(0, 10, 501)
y1 = np.sin(x)
y2 = np.sin(x+0.1)
y3 = np.sin(x+0.2)
y4 = np.sin(x+0.3)
y5 = np.sin(x+0.4)
# Create a new worksheet in writing mode
wks = op.new_sheet('w')
# Add data to the worksheet
wks.from_list(0, x)
wks.from_list(1, y1)
wks.from_list(2, y2)
wks.from_list(3, y3)
wks.from_list(4, y4)
wks.from_list(5, y5)
# Create a figure
gp = op.new_graph() # Create a graph object
gl = gp[0] # Select the first layer
# Plot entire worksheet
plot = gl.add_plot(f'{wks.lt_range()}!(?,1:end)')
# Group the plots
gl.group()
plot.colormap = 'Rainbow.pal'
gl.rescale()