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
Username:
Password:
Save Password
Forgot your Password? | Admin Options

 All Forums
 Origin Forum for Programming
 LabTalk Forum
 Contour plot label clash
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic

jdf726

78 Posts

Posted - 02/11/2019 :  7:01:51 PM  Show Profile  Edit Topic  Reply with Quote  View user's IP address  Delete Topic
Origin Ver. and Service Release (Select Help-->About Origin):
Operating System:

I have a bit of a label clash problem with a colour scale in a contour plot. This should show only the end values of the colour scale.



Normally I have this under control by setting just one major level and ~100 minor levels to give a smooth colour transition and only the end labels appear.

The trouble is, if I want to actually activate contour lines in my plot at some intermediate resolution (say ~ 10 levels) then all of these labels appear on the color bar.

The 'color bar style' dialog enables you to set the labels manually (in my case 'Levels...Custom levels...Major ticks..By Count = 2), but I want to do this programmatically.

Is it still the case that you cannot control these settings via Labtalk?
https://my.originlab.com/forum/topic.asp?TOPIC_ID=19893

I am pretty sure that this dialog has been upgraded in 2018...but while it has a 'hide head and tail levels' button it does not have the opposite, which is what I want.
https://www.originlab.com/doc/Origin-Help/ColorScale

I had a look to see whether you can access this in OriginC, looking at the tree stucture described in here https://www.originlab.com/doc/OriginC/guide/Customizing-Data-Plots
I extracted the tree info as per the suggestions (see below) but I don't think this includes the settings for the scale bar, only the plot itself.

Any ideas?


J.




OriginStorage
\---Root
+---Info
| \---BoundaryLine
| +---FollowContLine = 1
| +---Show = 1
| +---Color = 0
| +---Width = 0.5
| \---Style = 0
+---Misc
| +---MatchBy = 0
| \---MatchUDL =
+---ColorMap
| +---Details
| | +---Levels = 120:{0, 0.83333, 1.66667, 2.5, 3.33333, 4.16667, 5, 5.83333, 6.66667, 7.5, ..., 99.16667}
| | +---Colors = 120:{33488896, 33489924, 33490952, 33491980, 33493522, 33494550, 33495578, 33496606, 33497634, 33498662, ..., 16777471}
| | +---PatternStyles = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---PatternColors = 120:{16777216, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---PatternWidths = 120:{0.5, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---LineColorLink = 0
| | +---LineColors = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---LineStyles = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---LineWidths = 120:{0.932, 0.932, 0.932, 0.932, 0.932, 0.932, 0.932, 0.932, 0.932, 0.932, ..., 0.93}
| | +---Stretch = 120:{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ..., 1}
| | +---Proportional = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---XScale = 120:{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ..., 1}
| | +---YScale = 120:{1, 1, 1, 1, 1, 1, 1, 1, 1, 1, ..., 1}
| | +---XOffset = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---YOffset = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---Labels = 120:{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ..., 0}
| | +---ShowLines = 120:{1, 0, 0, 1, 0, 0, 1, 0, 0, 1, ..., 0}
| | +---MissingValue = -9999
| | +---MissingColor = 0
| | +---MissingPatternColor = 0
| | +---MissingPatternWidth = 0
| | +---MissingLineColor = 0
| | +---MissingLineStyle = 0
| | +---MissingLineWidth = 0
| | +---BelowColor = 0
| | +---BelowPatternColor = 16777216
| | +---BelowPatternWidth = 0.5
| | +---BelowLineColor = 0
| | +---BelowLineStyle = 0
| | +---BelowLineWidth = 0.932
| | +---AboveValue = 100
| | +---AboveColor = 17
| | +---AbovePatternColor = 16777216
| | +---AbovePatternWidth = 0.5
| | +---AboveLineColor = 0
| | +---AboveLineStyle = 0
| | +---AboveLineWidth = 0.93
| | +---AboveLabel = 1
| | \---AboveLine = 1
| +---Min = 4E-11
| +---Max = 1.2E-10
| +---RescaleMode = 1
| +---ColorFillControl = 2
| +---ScaleType = 0
| +---SetLevel = 0
| +---FirstLevel = --
| +---MajorLevels = 40
| +---MinorLevels = 2
| +---Increment = 2E-12
| +---LinkToPal = 1
| +---FlipPal = 0
| +---StretchPal = 1
| +---Palette = Thermometer.pal
| +---MajorLabels = 0
| +---MajorLines = 1
| +---MixingColors = 0
| +---ShowDataPoints = 0
| \---ShowGridLines = 0
+---NumericFormats
| +---Format = 0
| +---DivideByFactor = 0
| +---DigitsControl = 1
| +---DecimalPlaces = 4
| +---SignificantDigits = 4
| +---Prefix =
| +---Suffix =
| \---MinArea = 0
+---Labels
| +---Color = 0
| +---Face = 0
| +---Size = 22
| +---WhiteOut = 0
| +---Bold = 0
| +---Italic = 0
| \---Underline = 0
\---Transparency = 0

jdf726

78 Posts

Posted - 02/11/2019 :  7:19:24 PM  Show Profile  Edit Reply  Reply with Quote  View user's IP address  Delete Reply
Aha...I deleted my color bar and re-added it from the menu while holding Shift and Control. THat took me to the code which reminded me that this object is called 'Spectrum1'. I googled that and found this page.

https://www.originlab.com/doc/LabTalk/ref/Spectrum1-obj

I think there is a setting in here 'Spectrum1.labels.autodisp' that enables you to disconnect the colour bar settings from the ones in the main plot, including the labels.

Spectrum1.labels.autodisp=0;
Spectrum1.levels.major=3;
Spectrum1.levels.majorticks = 2;
Go to Top of Page
  Previous Topic Topic Next Topic Lock Topic Edit Topic Delete Topic New Topic Reply to Topic
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
The Origin Forum © 2020 Originlab Corporation Go To Top Of Page
Snitz Forums 2000