T O P I C R E V I E W |
horos22 |
Posted - 04/04/2005 : 6:18:53 PM Origin Version (Select Help-->About Origin): Operating System: windows 2000
hey all,
I'm having a little difficulty understanding the difference between templates and themes, or even why there needs to be two separate concepts here at all. What can you do with a template that you can't do with a theme (or vice versa)? Could you, for example, set the graph dimensions with a theme?
Thanks much,
Ed |
9 L A T E S T R E P L I E S (Newest First) |
horos22 |
Posted - 04/06/2005 : 9:35:37 PM Easwar,
I would prefer not to work with templates, but if I was to work with templates, I'd want to work with templates alone, not to have half the work recorded in a template, and have half the work recorded in a script.
And in my case, the plots in question have different units, scales, annotations, etc. There are several different types of graphs as well (from barcharts to pie charts to contour plots) although I could probably come up with a batch of templates that could fit somewhat. Some are loglog, some are linear. Some I'd want renditions of both. I'm skeptical that I could encapsulate all of this diversity into a series of templates.
And in any case, I'd like to share the intent about how I'm making these graphs to other people who might not have origin, and who might have to deal with other graphing packages, so if I could convey how the graph is put together in words, it would help a great deal.
So I guess what I'm saying is that scripting would be much preferred. Are future versions of origin going to have a 'record and playback' means of putting together scripts?
Ed
( ps - here, btw, is what I mean by a 'record and playback' mechanism. Tecplot does it, as described in this article:
http://www.tecplot.com/showcase/contours/issue_24/article06.htm )
----- Hi Ed,
As long as you are fine working with templates, one can set up an entire OPJ as a template where one makes all the necessary graphs using one data file, then save that OPJ and just change the data to update all graphs for each file.
If the above sounds like an option you want to try, you can look at the following free tool on File Exange: http://www.originlab.com/fileexchange/details.aspx?fid=86 which guides you thru the process of setting up and doing such OPJ-template-based batch plotting. The tool requires Origin 7.5 SR5. If you do not have 7.5, you can try with the demo version.
Easwar OriginLab |
easwar |
Posted - 04/06/2005 : 8:43:33 PM Hi Ed,
As long as you are fine working with templates, one can set up an entire OPJ as a template where one makes all the necessary graphs using one data file, then save that OPJ and just change the data to update all graphs for each file.
If the above sounds like an option you want to try, you can look at the following free tool on File Exange: http://www.originlab.com/fileexchange/details.aspx?fid=86 which guides you thru the process of setting up and doing such OPJ-template-based batch plotting. The tool requires Origin 7.5 SR5. If you do not have 7.5, you can try with the demo version.
Easwar OriginLab
|
Mike Buess |
Posted - 04/06/2005 : 07:59:40 AM > Is there a list of things that you *can't* do with LabTalk?
Not that I'm aware of. There's very little that can't be done with graphs in LabTalk.
> do you need to use the IDE supplied with origin to do compilation?
LabTalk scripts are not compiled. OriginC code must be compiled in CodeBuilder.
Mike Buess Origin WebRing Member |
horos22 |
Posted - 04/05/2005 : 8:12:29 PM Easwar,
You say 'currently no capability', is it planned for future versions of Origin? You have no idea how frustrating it is (well, maybe you do) to have to learn YASL (Yet Another Scripting Language) in order to do advanced stuff in given tools, and needing to compile something takes down productivity by an order of magnitude..
I guess where I'm coming from, is that it sounds like I'm going to need to juggle templates, themes, and LabTalk to do what I need to do (as well as learn another scripting language), which is going to hurt both productivity and development costs. Having an integrated 'recording macro' type device would speed up things unimaginably, and if not planned, I would strongly recommend it.
Don't get me wrong - I think that origin is exceedingly cool, and the more I play around with the interface, the more I like it. But at the same time, I can automate the production of thousands of plots with gnuplot - its language is that flexible. However, gnuplots *interface* has a steep learning curve, and I don't need to do the balancing act between templates, themes and script. And it doesn't have a production rendering engine, which limits my use.
I want both things - something has a great interface, is highly automatable, and has a small learning curve. I think its possible with these tweaks to make such a beast, and I think that it would be worthwhile for you guys to do so - if, for nothing other than to make your present users 'power users'. An integrated labtalk code example repository wouldn't hurt either.
Is there a list of things that you *can't* do with LabTalk? And is there a developer's forum where I can discuss these ideas?
Ed
( ps - do you need to use the IDE supplied with origin to do compilation, or do you have a command line for this? ) ---- Hi Ed,
There is currently no capability to record your actions in Origin and then edit/modify the file and play it later. You will need to create script or Origin C code to perform any operations from "scratch" or by loading and modifying existing projects etc.
Please see the following page for examples on Origin C: http://www.originlab.com/index.aspx?s=9&lm=71&pid=268 Also, the Origin C help files have code examples.
As for LabTalk, there are script examples in the LabTalk language reference files, and there is a lot of code examples that various users and OriginLab have posted in the LabTalk forum which can be searched. Same thing with Origin C forum. You can try posting specific questions related to either programming language in these forums.
Easwar OriginLab
Edited by - easwar on 04/05/2005 5:39:42 Pe |
easwar |
Posted - 04/05/2005 : 5:38:15 PM Hi Ed,
There is currently no capability to record your actions in Origin and then edit/modify the file and play it later. You will need to create script or Origin C code to perform any operations from "scratch" or by loading and modifying existing projects etc.
Please see the following page for examples on Origin C: http://www.originlab.com/index.aspx?s=9&lm=71&pid=268 Also, the Origin C help files have code examples.
As for LabTalk, there are script examples in the LabTalk language reference files, and there is a lot of code examples that various users and OriginLab have posted in the LabTalk forum which can be searched. Same thing with Origin C forum. You can try posting specific questions related to either programming language in these forums.
Easwar OriginLab
Edited by - easwar on 04/05/2005 5:39:42 PM |
horos22 |
Posted - 04/05/2005 : 3:41:42 PM > Not sure what your end goal here is, but it is not possible to boil > down everything to just human readable files. That said, one can > write human readable LabTalk script and/or Origin C code to > build a graph.
Here's what I have in mind. Take your average, open-source plotting software (say 'grace'). Anything you can do in the GUI you can do in the scripting language.
What I want to do is to be able to *record* my actions in the GUI into LabTalk. Hit an 'open' button, and type in a filename? Record:
open "filename"
into a log. Go into a List properties menu to change the color of a line? Record that as well.. etc. etc. Hit 'Stop' and then origin stops recording. Sort of like macros, except recording them in a readable, modifyable form.
There's no reason, as far as I can see, that a 'project' couldn't be a list of these commands. I could then, for example, write an interface in python or ruby or perl which interacts with origin and uses origin as a render farm - which would allow me to automate the production of thousands of graphs from those languages, which is my goal.
And as I said, it would also be a hell of a tutorial for LabTalk itself. Every project would be a LabTalk example.
> There is no LabTalk or Origin C equivalant for such objects - a > graph for example needs to be created from a template and then can > be customized.
right, but you should be able to get awful close. Everything should be able to be built up from the 'ground floor'; the templates that you provide with origin, plus labtalk.
You can modify existing templates inside of origin using origin gui commands, right? If you can do this via the GUI, what's stopping you from doing it in labtalk?
> Perhaps it will help if you call tech support and discuss what > exactly you are trying to acheive.
That's what I did; they suggested to come to the forums.
Ed
( ps -
is there a repository, examplebase, codebase, etc. for LabTalk scripts, something that I could take a look at? Perhaps making it so that all the 'graph gallery' on your homepage could be created by labtalk scripts? )
|
easwar |
Posted - 04/05/2005 : 1:24:19 PM Hi Ed,
Answers to some of your questions:
quote:
And now, what the difference between templates and projects are.
A project can contan a collection of object such as graphs, worksheets amongst other thing, PLUS data. Tempaltes cannot contain data.
quote:
What I'd ultimately like to do is take the 'gui out of the loop' so to speak - be able to define the graphs look, and create a graph on the fly with a human-readable script. And then automatically render it using origin.1
And what would be real cool would be if I could save graph or object, and have that object be represented in *LabTalk* or *OriginC*, not binary output. That way I could tweak the resulting code to see what it does. And this sure would be a cool programming tool.
Not sure what your end goal here is, but it is not possible to boil down everything to just human readable files. That said, one can write human readable LabTalk script and/or Origin C code to build a graph and further customize it, and then import and plot data into the graph etc. One has to however start with some template, as basic as that template may be (such as the Orign.otp template) to create a graph page and then can use code to add layers, customize everything etc.
quote:
Can you do everything that you can do in the origin GUI in labtalk anyway?
Most everything that you can do from GUI is accessible via LabTalk and/or Origin C.
quote:
So - is there some way of finding out the equivalent labtalk commands for a project/template?
There is no LabTalk or Origin C equivalant for such objects - a graph for example needs to be created from a template and then can be customized.
Perhaps it will help if you call tech support and discuss what exactly you are trying to acheive.
Easwar OriginLab
|
horos22 |
Posted - 04/05/2005 : 12:27:35 PM Easwar,
Thanks much, that helps a lot.
However, I'm wondering why themes are human readable and templates are not. And now, what the difference between templates and projects are.
What I'd ultimately like to do is take the 'gui out of the loop' so to speak - be able to define the graphs look, and create a graph on the fly with a human-readable script. And then automatically render it using origin.
And what would be real cool would be if I could save graph or object, and have that object be represented in *LabTalk* or *OriginC*, not binary output. That way I could tweak the resulting code to see what it does. And this sure would be a cool programming tool.
Can you do everything that you can do in the origin GUI in labtalk anyway? I notice that when you it hit <Ctrl> - <shift> left mouse on the to menu, or on the plotting items, you get what I'm assuming is labtalk. However, when you do the same thing inside a graph (when looking at layer properties for example) that this does not work.
So - is there some way of finding out the equivalent labtalk commands for a project/template? And is labtalk 'complete' in the sense that you can do anything inside of labtalk that you can do inside of the GUI?
Thanks,
Ed
----
Hi Ed,
Templates and Themes both contain information about various settings in a graph. The main difference is that a template is used at the time of creation of the graph, whereas a theme is applied to an already existing graph.
The other main difference is that a template can contain objects such as multiple layers, text labels, drawn objects such as rectangles etc. User can add many such elements and save to a template. A theme on the other hand cannot create any new objects in a graph. It can only change properties of existing objects in a graph, as long as the theme contains information on settings related to those objects.
Any graph that you create in Origin thus starts with a template. Once the graph is created, you can change the look and feel of the graph any time by applying a theme. In fact, there is a system theme setting which when turned on applies to all newly created graphs. One can thus pick a theme such as "ticks all in" as the system theme, and then even though all templates in Origin by default have ticks pointing outward, the system theme will make the ticks point inwards for every newly created graph.
Hope this helps. Please also take a look at the help files for more details. We will in the next version summarize the difference between the two in a tabular form.
Easwar OriginLab |
easwar |
Posted - 04/05/2005 : 09:53:42 AM Hi Ed,
Templates and Themes both contain information about various settings in a graph. The main difference is that a template is used at the time of creation of the graph, whereas a theme is applied to an already existing graph.
The other main difference is that a template can contain objects such as multiple layers, text labels, drawn objects such as rectangles etc. User can add many such elements and save to a template. A theme on the other hand cannot create any new objects in a graph. It can only change properties of existing objects in a graph, as long as the theme contains information on settings related to those objects.
Any graph that you create in Origin thus starts with a template. Once the graph is created, you can change the look and feel of the graph any time by applying a theme. In fact, there is a system theme setting which when turned on applies to all newly created graphs. One can thus pick a theme such as "ticks all in" as the system theme, and then even though all templates in Origin by default have ticks pointing outward, the system theme will make the ticks point inwards for every newly created graph.
Hope this helps. Please also take a look at the help files for more details. We will in the next version summarize the difference between the two in a tabular form.
Easwar OriginLab
Edited by - easwar on 04/05/2005 09:54:19 AM |
|
|