3D Plot Custom colormap
I am confused at how the custom colormap works. If I select point plot and graph a few points it seems the colors of the points maps one-to-one to the colormap. See the VI and select point as the plot style. The first point is red, next is purple, then blue.
However, if you select surface and do the plot of a surface it seems like it maps the colormap based on Z value? Try by selecting cwSurface as plot style.
What I am ultimately trying to do is plot a HSL colorwheel as one plot and then HSL points as the other plot on the 3D plot. I can generate the points but I am having trouble with the colorwheel.
Also, is there anyway to have the projected point be a different color type than the actual point? Any help would be appreciated.
John
Attachments:
3D Plot tester.vi 2615 KB
Hi John,
Starting with reply #7 of this thread
http://forums.ni.com/ni/board/message?board.id=170&message.id=143663&jump=true
I offer a "worst case" 4-d graph example.
Please read through that thread, down load the example and play with it a bit.
It sounds like your "ColorMapStyle" is not correct for what you are trying to do.
Here is a preview of that example.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Similar Messages
-
Cwcustom colormap style on small range when overall range is large
Hi, I am attaching the colormap example that David Mc., and NI Applications Engineer sent me a while back explaining using colorlookup tables. I modified this project to have a data range of 0 to 10001. There is a sin wave located in the range 9999 to 10001 and a single like of 0's to make the range huge of the overall scale. The problem I have is, I set my values of my custom colormap to being 9999, 10000, and 10001 respectively and they don't display in their ranges. If the 0's of the overall range are taken out so that the range only encompasses -1 to 1, this method works fine.
Am I doing something wrong? When a values is assigned to the colorlookup table, the respective value of the data shou
ld be that color correct? Why does this not work on a small range if the overall range is larger. It seems to me that it should.
Thanks,
Kevin
Attachments:
colormap.zip 6 KBHi Kevin,
When using a custom color map, the 3D Graph decimates the data to display as much of the data range it can. It doesn't take the axes ranges into account, it just tries to plot the surface over the entire range.
The large range you are using (0 to 10001 = 10001 point range) pretty much ends up looking like one point at the end of the spectrum. If you switch to a smaller range like 0 to 101 (= 101 point range), you can see how the smaller range can be better displayed by the 3D Graph.
I would suggestion you filter your data, and only plot the points that matter to you (i.e. the ones that fit inside your 3D axis range).
However, the situation you've run into might be a good use case for an enhancement to the 3D Graph: allow you to programmatic
ally control the decimation by setting a "window size". You can visit http://ni.com/contact and click "Product Feedback" to submit a product suggestion for this and any other features you'd like to see.
David Mc.
NI Applications Engineer -
hai,
Can some one plz explain me what is the need of going for Group Bar,Pie, Regression , Coustom Charts in IChart and
im trying to plot Custom chart type with Tag Query values but iam not getting that chart with the TagValues
plz can u tell with which query template we can plot the Custom Chart
Thanks &Regards,
ApsaraHi Apsara
Barchart: Bar charts are used for comparing two or more values.
Grouped bar chart: It is another type of Bar chart, with data values ordered by tagname/dataset, then by observation.
Pie Chart: It is circular chart and it is divided into sectors.
To see these charts:
http://localhost/LighthammerCMS/Help/Applet_Reference_Details/Applet_Overview.htm
To get info about other charts see this thread:
Regarding information about Chats
For custom chart:
When there is need to represnt diffrent type of datas like line chart and bar type chart in the same graph use the custom chart. To get the chart type, Go to the pen details tab and change the pen type from default to required type.
Hope this helps you.....
Regards,
Kishore -
Different custom colors for a WPF line plot
Dear Sir,
I am trying to create a WPF graph with different colors for different points of time , example Black 0-10,red 11-20, green 21-30...
I saw the nifty video and download the range masking cursor but got stuck.
Thank you
George MAsielloHere's a quick mockup of the custom renderer version (sorry I did not have time to translate it to VB myself):
public class CustomRenderer : PlotRenderer {
private static readonly DataRequirements _dataRequirements = new DataRequirements(
DataCulling.PreserveLines, DataDecimation.CoLinear,
new DataDimension( DataDimensionSource.IndexData, DataDimensionScale.IndependentScale ),
new DataDimension( DataDimensionSource.SampleData, DataDimensionScale.DependentScale ) );
// The color ranges we want to show on the plot.
private readonly Tuple<Color, double>[] _colorRanges = new[] {
Tuple.Create( Colors.Black, 10.0 ),
Tuple.Create( Colors.Red, 20.0 ),
Tuple.Create( Colors.Green, 30.0 ),
private readonly RenderTargetOptions[] _rangeOptions;
public CustomRenderer( ) {
// Create render options for each range color.
_rangeOptions = _colorRanges.Select( colorRange => new RenderTargetOptions( this,
RenderTargetOption.CreateValue( RenderTargetOptionsProperty.Stroke, new SolidColorBrush( colorRange.Item1 ) ),
RenderTargetOption.CreateValue( RenderTargetOptionsProperty.StrokeThickness, 1.0 ) ) )
.ToArray( );
public override SupportedRenderModes SupportedRenderModes {
get { return SupportedRenderModes.VectorAndRaster; }
public override DataRequirements GetDataRequirements( ) {
return _dataRequirements;
protected override Freezable CreateInstanceCore( ) {
return new CustomRenderer( );
protected override void RenderLegendCore( LegendRenderArgs renderArgs ) { }
protected override void RenderGraphCore( PlotRenderArgs renderArgs ) {
// Get the time axis for the renderer.
Plot plot = (Plot)renderArgs.Plot;
var timeAxis = plot.GraphParent.GetAxis( plot, Orientation.Horizontal );
var dataMapper = (IDataMapper<double>)timeAxis.GetDataMapper( plot.GraphParent );
int startIndex = 0;
var xData = renderArgs.RelativeData[0];
var yData = renderArgs.RelativeData[1];
var renderTarget = renderArgs.RenderTarget;
for( int i = 0; i < _colorRanges.Length - 1; ++i ) {
// Draw all data below the current range with the associated color.
int endIndex = startIndex;
double range = _colorRanges[i].Item2;
double offset = dataMapper.Map( range );
while( endIndex < xData.Size && xData[endIndex] <= offset )
++endIndex;
RenderSegment( startIndex, endIndex, xData, yData, renderTarget, _rangeOptions[i] );
startIndex = endIndex;
// Draw all remaining data with the last color range.
RenderSegment( startIndex, xData.Size, xData, yData, renderTarget, _rangeOptions.Last( ) );
private static void RenderSegment( int startIndex, int endIndex, Buffer<double> xData, Buffer<double> yData, IRenderTarget renderTarget, RenderTargetOptions options ) {
int length = endIndex - startIndex;
if( length <= 0 )
return;
// Join current range with previous.
if( startIndex > 0 ) {
--startIndex;
++length;
using( Buffer<double> xSegment = xData.Slice( startIndex, length ) )
using( Buffer<double> ySegment = yData.Slice( startIndex, length ) )
renderTarget.DrawLines( options, xSegment, ySegment );
~ Paul H -
Custom Icon/Marke​r on XY Plot
Hello,
I have an XY plot in which shows the intended path and current position of a aircraft. I have drawn up a picture of what it somewhat looks like and I attached it to this post. I would like to have a custom icon that will point in the direction the aircraft is flying. I have the heading, so that data is not a problem, though, I am sure there are other problems that I will run in to. I've only looked into this a small bit and have come up with quite a few dead ends. I am now considering going down the ActiveX path, but wanted to get some insight before I dove into that (especially I have not done at ActiveX). That being said, take a look at my picture, which will better explain what I am looking for. I show only 4 time quantities, but there will be many more in the final product since it is a real-time application.
I have seen this page, http://forums.ni.com/ni/board/message?board.id=170&message.id=379432&query.id=4622127#M379432, but considering it is over a year old, I wanted to check and see if anything has changed.
Thank you and let me know what you guys think.
Michael
Message Edited by MegaWatts on 04-12-2010 11:41 AM
-You can never have too much power...
Attachments:
custom_marker.jpg 43 KBUse a picture control.
LV has a shipping example of a XY XChart that is based on the Picture.
THis thread has links to threads with picture related examples.
I used the picture control to render the vectors showing air speed and direction inside a mine gallery. It worked good for me.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Custom Y-grids for multi-plot graphs
How do I get the Y-axis gridlines to change for a given Y-axis (I have three)? As it is now, I have different scales for each Y-axis and the gridlines for all of them are displayed at the same time. This makes the graph very messy and it is difficult to discern which plot goes with which gridline.
The way a multiplot graph is displaying scales is a bit curious.
It's true a graph displys all scales at the same time, so if the various Y scales are different the display is confusing as you said.
I suggest you some workarounds.
First of all, arrange all Y axis in order to have the same or multiple scale so that all grid lines are equally spaced.
Second, display the same lines for all Y scales (customizing the tabs as Alberto says).
Third, display grid lines for different Y axes with different colors (maybe choosing pastel colors for grid lines and the same but bright color for plots).
Fourth, hide all grid lines but one. It seems that this built-in option works in a curious way: if you have a black graph background you can see some pixels painted along X grid
lines where Y grid should lie, and if you have another color background you can see the complete but 'hided' grid lines, as if they were painted in black instead of transparent. So I suggest you to use for grid lines the same color as graph background : that way the Y axis grid lines are effectively hided.
Hope this helps
Roberto
Proud to use LW/CVI from 3.1 on.
My contributions to the Developer Zone Community
If I have helped you, why not giving me a kudos? -
Charting / custom plot chart advice?
Hi, I'm trying to build a customized chart in Flex that might
be a bit over my current skill level so I was hoping I could get a
tip how to approach this. Essentially it will be a plot chart with
an associated data table. The plot chart will have only one series
of data but each point on the chart shall indicate a range. Instead
of having two dots on the chart (2 series) that indicate the lower
and higher bound, I want to have, in essence, two dots that are
joined by a wide long bar. If that's too hard I might go for just a
thick bar going from lower bound to upper bound. I believe this
should be done with just one data series indicating the upper and
lower value because both values really belong together. The user
would click anywhere on that bar to select it. So there is only one
item to interact with per point and therefore there is also only
tooltip for both. The bars are not evenly spaced out but based on
date information, so I'd use a Data-Time axis horizontally and a
regular linear axis vertically.
I believe the right way to build this is a custom renderer
for the actual datapoint and that's where I was looking for a
tip/advice. Is that hard to do? Is there some classes that I can
tweak into doing that for me without writing custom components or
such?
The other thing I want to achieve (after I solved this one)
is to have a data grid associated with the chart. When one data
item is clicked in the chart, the corresponding row in the table
gets highlighted, and vice versa, if the user clicks a row in the
table, the corresponding chart item is highlighted. I think that's
doable too, it's just a bit tricky with how the events are flying
around I think. But, as I said, first I need to figure out the
chart.
If anybody has some advice how I should approach that I sure
would appreciate it. I experimented around with Bubble charts over
a category axis for a while but I think it really should be done
with a plot chart over a time axis and maybe a custom renderer for
the data point.
Thanks a bunch!
AndreasHi AndreasD,
Can you please let me know if you were able to get solution to the below querry. My curent requirement is very close to what you have specified in the querry
Regards
Kalavati Singh
[email protected] -
Plot chart- embbeding a custom swf file
I'm currently using the plot chart element to display dynamic from a MySQL database. I decided I wanted to use a custom embedded swf file. The issue I'm running into is the way the swf file looks. Is there a way keep the original size (width/height) and not have to look deformed? Adjusting the radius only makes the swf "fatter".
Here is the code that I'm using:
<mx:series>
<mx:PlotSeries
id="plot"
xField="xfieldname"
yField="yfieldname"
radius ="45"
itemRenderer="@Embed(source='file:/C:/images/movie.swf')"
showDataEffect="slideUp"
/>
</mx:series>
</mx:PlotChart>Hi,
there are two very distinct things: one is to emit an actual swf, and the other one is to tell an existing swf to show something....
Now assume your user can choose a few symbols from the library and drag them around .... and imagine an xml file that liss the symbol name and its coordinates on stage as well as its scaling factor.
Next assume the user can click somewhere to type text ... and imagine the xml file to contain text entries with actual text, font size, and coordinates
I did something with AS2 following this scheme: a server script copied the existing swf and added an actionscript block equivalent to the above-mentioned xml file. I have not studied details of AS3 files enough to tell whether the same is possible with AS3, but I sort of believe that an xml string embedded as a byte string could be amended / replaced in a similar way -
Custom color overwritten in plot
My custom colors are overwritten by the system defaults. Why?
Attachments:
Untitled 4.vi 41 KB
Untitled1.jpg 319 KBHi murchak,
In your code it looks like the error bar is only created at the very end of execution (i.e. it is placed outside of the for loop, so the plot will only be created after everything in the for loop is done executing). You are trying to modify the properties of the plot in that other for loop before the plot is created. You should try modifying your code to modify the line colors after or while the plot is created. Something worth trying would be to use a sequence structure to make sure the the right for loop executes after the error bar is created.
Regards,
James D.
Applications Engineer
National Instruments -
Custom chart - spiral plot?
I have been tasked with creating a series of chart types that
don't appear to be among those available with Flex 3. Most
worrisome among these is a plot of data vs 24-hour time. The graph
should appear as a series of data points plotted inside a circle
with 'midnight' at the top and 'noon' on the bottom. Inside of this
would be some concentric rings and lots of x/y data.
How would I go about getting started creating such a chart
type?ILOG Elixir has a radar chart that looks like it might be
able to be used as you'd like.
If not, check out the plethora of other charting types they
provide.
At a cost of course, but versus development timecost,
probably a hell of a lot cheaper to buy ILOG Elixir.
http://www.ilog.com/products/ilogelixir/
http://www.ilog.com/products/ilogelixir/features/radar-charts/ -
Plot a chart dynamically based on the values selected
Hi All,
I have some requirement like this i want to plot a chart . The chart should change dynamically based on target_name and date. What type of UI should I use ? I tried using multiselect or shuttle for choosing the target_name and date picker tool for date once i choose all this the chart should appear. Can I have a custom button called submit so once all the values are entered it plots chart ? Please help me out with our ideas.
Thanks in AdvanceHi,
Using the dependent value sets you can govern the values which can be selected based on a specific value selected in a particular segment. Example if Country name is selected in segment 1 then specific states names as per the country selected can be displayed in segment 2.
As per the requirement described you want to enable different fields based on the value selected in segment1, currently there is no standard mechanism available to enable/disable fields based on a value and you will have to do an extension/customization to meet this requirement.
Thanks,
Sanjay -
How can I create a custom repeat ("second Wednesday") in Calendar in calender
I have some repeating events (I believe transferred from previous phone) where the "repeat" line says "Custom" and the "every second Wed." (for example" carried over and plots correctly on the iPhone calender, but I don't see any way to CREATE a custom repeat like that. Is it possible?
There is not a selection for every second Wednesday, but you can repeat the event every two weeks as that is a choice. Hope this helps :)
-
How to load a custom waveform for use with DAQ voltage generation
I would appreciate some advice on how to take a custom waveform (just a modified triangle wave with pauses at the tops and bottoms) and use that to control the voltage output from a DAQ.
Some background: My intent is to use the waveform to control mirror scanning for a LADAR imaging application . Because our DAQ (NI-6251) only has one clock, it cannot update the X and Y channel voltages independently. I'm using a triangle wave to control both axes, which works fine for the X direction. However, to prevent the Y axis from incrementally steping up after every X pixel, I'd like to construct a waveform, similar to a step pyramid, so that the Y axis remains constant over the X sweep and only updates to the next row after all X pixels are collected.
I assume I can make the desired plot in excel, and then read it in somehow - but this is where I start to get fuzzy. Can any one point me to an example or tutorial on this?
Some other questions:
1. Do I needto worry about scaling? will my custom plot need to contain a specific number of points (perhaps the exact number of pixels in the image)?
2. If I change the image dimensions, will I need to revise the control waveform in the Y axis?
Thanks in advance,
jimmyThis thread didn't appear to go anywhere. I am trying to do something similar and was looking for help. I want to create a repeating output voltage wave based off the excel file attached(with times). Is there a way to have my program match the output voltage and time with the table attached on a repeat and send that signal to the output?
Thanks,
T
Attachments:
Sig Gen.xlsx 34 KB -
Waveform Plot Name in Legend Reverts to default even if I change it with a Property node
I have a waveform chart where I am trying to name the plots different titles, so that they appear in the plot legend with a meaningful name, rather than 'Plot 1', 'Plot 2', etc.
However, no matter what I do, if I try to change plot 0's name to anything, the plot name changes for a split second, and then reverts to the name that it originally had. I can succesfully control the names of the other plots, but not plot zero. I have enclosed the VI with the graph control, which I cut and pasted from another VI.
It seems that the properties of this control (though it is not a custom control) are set, and that these settings take precedence over the Propery Node Instructions. Is this a bug, or am I missing something.
Try it for yourself.
Wes
Wes Ramm, Cyth UK
CLD, CPLI
Attachments:
Untitled 1.vi 14 KBIgnore attributes help says;
If FALSE (default), the plot names in the plot legend automatically adapt to the plot names in the dynamic or waveform data attributes. If TRUE, the plot names do not adapt to the dynamic or waveform data attributes. Change this property to TRUE if you want to change the plot names. This property applies only to graphs and charts with dynamic or waveform data.
Trying to help,
Ben
Message Edited by Ben on 11-28-2006 07:46 AM
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction
Attachments:
untitled.JPG 86 KB -
Custom Tag Capitalization Problem..
All,
OS: Windows 2000
App Server: Weblogic 6.0 sp 2
JDK: 1.3 (and tried 1.3.1)
I have a set of custom tags that run fine when I use them on an app server (such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which weblogic 6.x requires, they suddenly start generating errors with attributes which have capitalized letters in them. For example, in my taglib I have:
<attribute>
<name>closeConnection</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
and in the support class I have:
* Get the value of closeConnection.
* @return value of closeConnection.
public boolean getCloseConnection() {
return closeConnection;
* Set the value of closeConnection.
* @param v Value to assign to closeConnection.
public void setCloseConnection(String v) {
if(v.toUpperCase().equals("TRUE")){
this.closeConnection = true;
} else {
this.closeConnection = false;
When I go to the page that this tag is on, I get the following output:
Parsing of JSP File '/index.jsp' failed:
/index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks': There is no setter method for property 'closeconnection', for Tag class 'net.cwerks.taglib.MyTag'
probably occurred due to an error in /index.jsp line 1:
<%@ taglib uri="/cwerks" prefix="cwerks" %>
Thu Aug 02 19:06:52 PDT 2001
Note that the 'closeconnection' is all lowercase despite the fact that it is upper case in the tld and in the class itself.
I came across a similar problem in weblogic 5.1 when I upgraded from JDK 1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2, but a dll was missing. I also tried switching it to 1.3.1, but that did not help. It seems like introspection may have changed slightly between the two version. I'm shocked, and a bit suspicious, that I haven't seen this problem all over the newsgroups. Anyone else seen this?
Thank you,
Carson Gross
[email protected]
[att1.html]
A solution presents itself:
The problem was NOT with capitalization. Instead, the problem was as
follows:
My method was for setting a boolean, but I took a string so that people
wouldn't have to type:
<mytags:tag foo="<%=true%>" />
instead, they could type:
<mytags:tag foo="true" />
which would call the setter method with a string "true", which would be then
converted to a boolean within my class.
So my setter has this signature:
public void setFoo(String s)
and my getter has this signature:
public boolean getFoo() /* I know this isn't standard, but isFoo doesn't
sound good to me*/
I can't tell if it's because JavaBeans changed slightly between jdk 1.2.2
and 1.3.x, or if Weblogic changed the way that they do things (I suspect the
latter, since I had things working fine in WL 5.2 w/ jdk 1.2.2 and then
things broke with WL 5.2 w/ jdk 1.3), but this no longer returns foo as a
valid property to be set, and since weblogic 6.x relies on JavaBeans,
instead of straight up introspection, it barfs. (I found this out by using
jad/emacs, a wicked combination for those who want to poke around in jars).
Anyway, I hope I can save someone else who has this same, albeit
specialized, problem a lot of pain by my discovery. Your getters and
setters better be of the same type with custom tags, or weblogic w/ jdk1.3.x
is gonna barf when parsing the tld.
Cheers, and thank God that's behind me,
Carson Gross
[email protected]
====================================================
"Carson Gross" <[email protected]> wrote in message
news:[email protected]...
The plot grows thicker...
The tags work fine on Tomcat 3.2.2
I deploy the example tags that came with wl60 that have more than one
capital letter in thier attributes, and they work fine. But my tag library
stubbornly insists on not working so long as I keep the attributes with more
than one capital letter in. If I remove the offending attributes, or change
them to have only one capital letter, they work, but this is not an
acceptable solution. (I guess.)
I even created an simple introspection class to make sure that the acutal
methods were there. They were.
I am at a complete loss here... I guess it's tomcat for now.
Cheers,
Carson Gross
[email protected]
"Carson Gross" <[email protected]> wrote in message
news:[email protected]...
All,
OS: Windows 2000
App Server: Weblogic 6.0 sp 2
JDK: 1.3 (and tried 1.3.1)
I have a set of custom tags that run fine when I use them on an app server
(such as Enhydra) with JDK 1.2.2, but when I switch to JDK 1.3.x, which
weblogic 6.x requires, they suddenly start generating errors with attributes
which have capitalized letters in them. For example, in my taglib I have:
<attribute>
<name>closeConnection</name>
<required>false</required>
<rtexprvalue>true</rtexprvalue>
</attribute>
and in the support class I have:
* Get the value of closeConnection.
* @return value of closeConnection.
public boolean getCloseConnection() {
return closeConnection;
* Set the value of closeConnection.
* @param v Value to assign to closeConnection.
public void setCloseConnection(String v) {
if(v.toUpperCase().equals("TRUE")){
this.closeConnection = true;
} else {
this.closeConnection = false;
When I go to the page that this tag is on, I get the following output:
Parsing of JSP File '/index.jsp' failed:
/index.jsp(1): Error in using tag library uri='/cwerks' prefix='cwerks':
There is no setter method for property 'closeconnection', for Tag class
'net.cwerks.taglib.MyTag'
probably occurred due to an error in /index.jsp line 1:
<%@ taglib uri="/cwerks" prefix="cwerks" %>
Thu Aug 02 19:06:52 PDT 2001
Note that the 'closeconnection' is all lowercase despite the fact that it is
upper case in the tld and in the class itself.
I came across a similar problem in weblogic 5.1 when I upgraded from JDK
1.2.2 to JDK 1.3. I tried changing the JDK for weblogic 6.0 sp 2 to 1.2.2,
but a dll was missing. I also tried switching it to 1.3.1, but that did not
help. It seems like introspection may have changed slightly between the two
version. I'm shocked, and a bit suspicious, that I haven't seen this
problem all over the newsgroups. Anyone else seen this?
Thank you,
Carson Gross
[email protected]
Maybe you are looking for
-
Functional Specifications for LSMW required urgently
Hi Friends, Can you please provide me with the functional specifications for lsmw. I need a template document which i should be able to use as Func Specs for different lsmw objects. Kindly forward the same to [email protected] Thanks & Regards, Vijay
-
Im getting error 40 when i try to restore
im getting error 40 when i try to restore
-
CPU is maxed when burning.
Hi! When burning a disc ITunes my CPU usage runs at a pretty constant 100 percent and the PC slows waaaaaaay slow. My setup is pretty fast and up to date. I posted the log results below, One item of note might be: "No drivers in LowerFilters". Any he
-
None of my passwords are working on my macbook pro
I booted up my computer for the first time this afternoon and one of the passwords I use will not be accepted for the logins I use it for. This includes whhen I am asked to update my software, install new software, boot up in safemode, and even auth
-
Can't see total size of playlist on latest version of iTunes, and no View option obvious. Helpful to have this before burning CD's. Any steer appreciated.