3D Stem Graph String-based Axes

When using 3D Stem Plots and real-world data, I successfully generate a 3D Graph. However, I was wondering if it is possible to customize the X and Y axis values with strings rather than numbers. I still want the Z-Axis to be a numerical intensity, but rather than having the X and Y values be an integer that I have to define in a note, I would like to make these values show strings.
My VI (attached) involves sample baseball batting/running statistics for each position (except pitcher).
Thanks in advanced,
T16626
"Whether you think you can or can't, you're right."
~Henry Ford
Solved!
Go to Solution.
Attachments:
STATS_for-3D-data_CHOOSE-THIS-ONE.csv ‏1 KB
SQUIRES_real-life-3d-data.vi ‏17 KB

Thanks Shane, but this isn't exactly what I was asking. Maybe I convoluted my question.
Imagine a 2 dimensional vertical bar graph.
The Y-Axis shows intensity, while the X-Axis is marked with what each bar refers to.
So let's say we're looking at a pizza parlor. They graph how many cheese, pepperoni, and sausage pizzas are sold on average per week.
Cheese---25 per week
Pepperoni---20 per week
Sausage---18 per week
so the X-Axis would have 3 tick marks, one designating each bar (cheese, pepperoni, and sausage) and the Y-Axis would be marked from 0 to 25, and the bars would reach 25, 20, and 18 units high respectively.
Here's a visualization of an ideal X-Axis (from Wikipedia's page "Bar Chart"): http://upload.wikimedia.org/wikipedia/commons/3/35/Incarceration_Rates_Worldwide_ZP.svg
What I am looking to do is find a way to create these custom ticks on the X-Axis instead of writing off to the side:
"1 refers to cheese, 2 refers to pepperoni, and 3 refers to sausage"
Please note that my goal is to apply this concept to a 3-D graph, rather than a 2-D graph.
Hope this clarifies my question.
~T16626
"Whether you think you can or can't, you're right."
~Henry Ford

Similar Messages

  • How to extract substring from a string based on the condition ??

    Hi,
    I'm having a very large string which as below
    EQD+CN+SAMPLE18767+2200+++5'
    NAD+CA+FIR:172:20'
    DGS+IMD+3.2+2346+55:CEL'
    FTX+AAA+++GOOD'
    FTX+AAA+++ONE'
    EQD+CN+SAMPLE18795+2200+++5'
    NAD+CA+TIR:172:20'
    DGS+IMD+3.2+2346+55:CEL'
    FTX+AAA+++SECOND'
    FTX+AAA+++IS FAIR'
    similarly FTX+AAA as above and it goes on
    i tokenized each segment with delimiter as ' and able to read each segment.
    Now i want to concatenate the FTX+AAA in a single segment if more than one FTX+AAA with IMMEDIATE below
    The output is as follows
    EQD+CN+SAMPLE18767+2200+++5'
    NAD+CA+FIR:172:20'
    DGS+IMD+3.2+2346+55:CEL'
    FTX+AAA+++GOOD,ONE'
    EQD+CN+SAMPLE18795+2200+++5'
    NAD+CA+TIR:172:20'
    DGS+IMD+3.2+2346+55:CEL'
    FTX+AAA+++SECOND,IS FAIR'
    similarly FTX+AAA should be concatenated if it has similar FTX+AAA IMMEDIATE below.
    The FTX+AAA segments can come any number of times immediate below
    Please help me how we can do this??? Can anyone help me with the code snippet to do this?
    Thanks,
    Kathir

    Encephalopathic wrote:
    You've posted > 300 times here and you still don't respect the rule regarding notification of all cross-posts? [http://www.java-forums.org/advanced-java/30061-how-extract-substring-string-based-condition.html]
    Do you think this this will help convince others to help you?See also [http://www.coderanch.com/t/500088/java/java/extract-substring-string-based-condition|http://www.coderanch.com/t/500088/java/java/extract-substring-string-based-condition].

  • How change the graph dynamically based on pivot table.

    Hi,
    My Report having pivot table and bar chart. Organization Name column set as pivot table prompts in pivot table.So Organization Name is appear as dropdown list.If i choose the diffrent Organization Names the pivot table data is according to the Organization Name but no changes in chart.How change the Graph dynamically based on pivot table.
    Please help on this.

    ok.I created pivot table with 4 columns and created chart using pivot table chart options but all 4 columns are displaying chart.But I need only 2 column in chart ..unable to edit the only chart in pivot table.Please help on this.Thank you..

  • Spliting a string based on Non Printable character

    Hi,
    i have a requirement where i have to split a String based in non printable character " MYU(ascii: 230);
    es: ""This is to test æ raaaaaaaaaaaaaaaaa æ AAA010224544 æ 7118288888 æ
    æ is a not printable character and its ascci is 230..
    iam getting that string from form how to split it in Java..
    Any suggestions...?

    One of many ways
        String initString = "This is to test æ raaaaaaaaaaaaaaaaa æ AAA010224544 æ 7118288888 æ";
        String[] tokens = initString.split(String.valueOf((char)230));
        for (String string : tokens)
          System.out.println(string.trim());
        }

  • Facing memory error during shifting from 3d stem graph to 3d surface graph in labview 2010

    hello all,
    earlier I was using 3D Stem graph in labview 2010. Now we want to move to Surface plot for same data.when i am trying surface graph it shows memory error.
    I have  10240 data.
    I was using vector method in stem graph so now for Surface graph i have thought that i have to make matrics of 10240x10240 and its diagonal elements should be my Z co0ordiants.
    plz help me out here.
    thanks & regards, 

    hello mikeporter,
    thanks for reply.I am attaching my Vi. It has some error also.plz look into it.
    X and Y are my co-ordinates pairs.I will be having values for these and have to update for same.
    Attachments:
    Untitled 2_surface.vi ‏184 KB

  • Determining the actual length of a string based on pixels?

    How would you determine the actual length of a string based on pixels? Reason for is because a length of a string containing all " l " chars would be a lot smaller then the length of a string containing all "H" chars based on pixel width.
    thanks,
    newbie

    Yes, look at the FontMetrics class which has methods to do just that. To get a relevant FontMetrics object, try "x.getFontMetrics(f)" where x is a Component and f is the Font your string is represented in.

  • I need to sort an array of strings based on the number in each string.

    Basically, I have a directory of files that all have the same name but each with a different number on the end.
    example: image 1.jpg, image 2.jpg, etc.
    When I use the List Directory function that returns an array of strings containing the file names in the directory, they don't come out in a 1, 2, 3, order like they appear in the directory. It sorts them character by character so that they come out like: 1, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 2, 20, 21, 22 etc.
    Is there a simple way of sorting this array of strings with the file names (as above) so that they are in numerical order?

    It's a while since this thread was started, but I am sure others will have use for this so here goes:
    The in-built array sort function sorts the strings the same way DOS and Windows do. Microsoft has fixed this in the Explorer that comes with XP, however the rest of the OS(s) still sorts the old way.
    The attached "AlphaLogical String Array Sort" VIs will sort strings arrays the same way as the new XP Explorer. There are three different implementations of the sorting, one based on the Insertion sort algorithm, a Quick Sort based on recursive calls (the most elegant way, but unfortunately LabVIEW has too much overhead when doing recursive calls so this is actually a very slow alternative) and finally the fastest; a stack based Quick Sort. There is also a test VI that will show you how the different implementations perform.
    I had not used recursive calls in LV much until I made the attached quick sort and was a bit disappointed by the fact that it is so slow, but it's a good learning example...The ability to do recursive calls this way was introduced in LV7 I believe...There is an example here on the zone that shows how you can calulate a factorial by using recursive calls, however - unlike for the quick sort (normally) - recursive calls are actually not the optimal solution for that calculation.
    Message Edited by Mads on 09-13-2005 02:30 AM
    MTO
    Attachments:
    AlphaLogical Sorting.zip ‏142 KB

  • Newbie Question: Rules: Functions: How to compare String based type?

    I have some XML facts in my rules dictionary defined by the following schema (fragments shown)
    <xs:simpleType name="VarType">
       <xs:restriction base="xs:string">
          <xs:enumeration value="Foo"/>
          <xs:enumeration value="Bar"/>
          <xs:enumeration value="Baz"/>
          <xs:enumeration value="Qux"/>
       </xs:restriction>
    </xs:simpleType>
    <xs:complexType name="ProgType">
       <xs:sequence>
          <xs:element name="ID" type="xs:string"/>
          <xs:element name="var" type="VarType" maxOccurs="unbounded"/>
       </xs:sequence>
    </xs:complexType>
    Which means that a Prog of ProgType has an ID and a "list" of "var" strings restricted to bounds specified by VarType.
    The issue comes when I try to create a Rules Function operating on these types.
    Function-> boolean containsVar(ProgType prog,VarType var) (built using the Functions tab of the Rules editor)
    for (String v : prog.var ){
       if (v == var){
          return true
    return false
    The problem we run into here is typing. If v is declared a String, as here, then v == var is invalid because types don't match. But I can't declare v a VarType due to
    RUL-05583: a primitive type or fact type is expected, but neither can be found.
    This problem may stem from the fact the Java's String is declared final and can't be subclassed, so the JAXB translation to Java may have to wrap it, futzing ==/equals() in the process.
    SO... How do I create this method and compare these values?
    TIA
    Edited by: wylderbeast on Mar 10, 2011 9:15 AM - typos
    Edited by: wylderbeast on Mar 10, 2011 9:18 AM

    And here's the answer.
    var.value() seems to return the String value of the type
    so the comparison becomes
    (v == var.value())
    Live and learn....

  • XY graph with N axes and translate it into a picture

    Hello - The VI has two windows diagrams (lower, narrow) is possible to unite them in one picture? - The VI (top left window graphics) have a common axis, but its hard to see the first graph "PLOT0" because he has little value compared with the values ​​of graphics "PLOT1", to avoid this problem, adding even more axis "X and Y '(top right graph window), now both graphs are visible, but they overlap each other, how to spread these graphs relative to each other. (In the diagram where one axis is obtained by adding a factor to make a Slider and Slider1), and the graph with 2 separate axes do not get how to be? - Is it possible to programmatically make up the axes of the "Duplicate Scale"? Thank you.
    Attachments:
    Ex.vi ‏21 KB

    now both graphs are visible, but they overlap each other, how to spread these graphs relative to each other. 
    You can move the secondary axes to the other side of the graph by right clicking on it and selecting "Swap Sides."
    Is it possible to programmatically make up the axes of the "Duplicate Scale"?
    I don't understand this question. Do you want to programmatically set the Max and Min of the axis? Please clarify the question.
    Nathan S.
    Applications Engineer
    National Instruments

  • Oracle Spatial function to find nearest line string based on lat/long

    Hi,
    Here is my scenario. I have a table that contains geometries of type line strings (the roadway network). The line geomteries are of type Ohio state plane south (SRID 41104).
    I have a requirement - given a lat/long, find the line string that snaps to that lat/long or the nearest set of line strings within a distance of 0.02 miles.
    This is a typical example of trying to identify a crash location on our roadway network. The crashes being reported to us in lat/long thru the GPS system.
    How can i acheive this through any spatial functions?
    Thanks for the help in advance.
    thanx,
    L.

    Hi L,
    That is not the way I would do it. I would convert my road segments to LRS data, then you can do all queries on the same data.
    Or, if you do not want to modify your original data, create a copy of your road segments with the same ID's and convert the copy into LRS data. If you keep the ID's identical, you can easily use geometry from one and LRS data from the other - as long as you are sure the ID is the same.
    Which will make the workflow a bit easier:
    1. Use SDO_NN to get the closest segments
    2. Use SDO_LRS.PROJECT_PT to get the projected point
    3. Use SDO_LRS.GET_MEASURE to get the measure
    And most of these you can incorporate into one single query. Now I am writing this of the top of my head (It's been a while since I played with LRS). so this has not been tested, but something like this should work (but could probably be greatly improved - it's getting late for me :-) ):
    SELECT
    SDO_LRS.FIND_MEASURE  --//find_measure needs an LRS segment and a point
        SELECT            --//here we select the LRS segment
          r.geometry 
        FROM
          roadsegments r
        WHERE SDO_NN(r.geometry,    --//based on the given GPS point
                     sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                     'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
      SDO_LRS.PROJECT_PT  --//We project the point on the LRS segment
          SELECT         --//here we select the LRS segment (again, which could probably be improved!!)
            r.geometry 
          FROM
            roadsegments r
          WHERE SDO_NN(r.geometry,
                       sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL), 
                       'sdo_num_res=2 distance=0.02 unit=mile') = 'TRUE'
        sdo_geometry(2001, 41104, sdo_point_type(lat,lon,NULL), NULL, NULL) --//The GPS point again
    AS milemarker from dual;So it is not as complicated as you think, it can easily be done with just one query (SQL can do a lot more than you think ;-) ).
    Good luck,
    Stefan

  • Service Insertion/Service Graphs & Policy based traffic redirection

    Hi,
    My question is to use policy based service insertion/service graphs between the EPGs communications to redirect traffic to ASA firewall & F5 slb.
    Below are Cisco ACI components:
    1- Spines & Leafs
    2- APIC Controllers
    3- Cisco ASA Firewall attached to the APIC via device package
    4- F5 SLB attached to the APIC via device package
    I have the below scenario for the communication between the EPGs e.g:
    WEB-EPG (consumer)
    APP EPG (provider) (consumer for DB)
    DB (provider)
    I want to use contract that includes filter on port 80 to permit and action for service insertion to provide SLB (F5) service between the WEB & APP communications.
    I want to use contract that includes filter on port any* to permit and action for service insertion to provide firewall (ASA) service between the APP & DB communications.
    Can I do policy based "traffic redirection" through service graphs in the contract's service insertion?
    Is it supported in version 1.0(3i)?
    I believe, NSH (Network services header) will add in the VXLAN header before reaching the dest VNID and redirect the traffic to the clusters of the services node i.e. SLB or FW, Then traffic will reach the destination address after striping all services.  
    Regards,
    Anser

    Hello Muhammad, 
    traffic redirection is not supported on 1.0(3i) , while NSH is still submitted to IETF as a draft from industry vendors , I think try to avoid waiting for it.
    Regards
    Mohammed ElSherbiny

  • Parse string based on pattern

    I'm trying to make a small prog that extracts a song's artist from its filename based on a specified pattern.
    Something like this:
    public String getArtist(String filename, string pattern) {
    String artist = getArtist("The artist - the title.mp3", "artist - title");
    artist = getArtist("01 - Another title - Another artist.mp3", "track - title - artist");Any good ideas on how to implement getArtist would be appreciated... :)

    heres my idea of how to solve it...
    this solution is not complete, but you may perfect it any way you like... it's just a quick and dirty hack ;)
    import java.util.regex.*;
    public class ArtistProblem {
    public static void main(String[] args) {
      if (args.length == 2) {
       System.out.println(getArtist(args[0], args[1]));
      } else {
       System.out.println(getArtist("The artist - the title.mp3", "artist - title"));
       System.out.println(getArtist("01 - Another title - Another artist.mp3", "track - title - artist"));
    public static String getArtist(String filename, String pattern) {
      // change track to regex that matces any spaces nad word characters
      pattern = pattern.replaceAll("track", "[\\\\w ]*");
      // change title to regex that matces any spaces nad word characters
      pattern = pattern.replaceAll("title", "[\\\\w ]*");
      // remove extention from the end of filename
      filename = filename.replaceAll("\\.mp3$", "");
      // change artist to regex that groups matched pattern
      pattern = pattern.replaceAll("artist", "([\\\\w ]*)");
      Pattern patt = Pattern.compile(pattern);
      Matcher matcher = patt.matcher(filename);
      if (matcher.find()) {
       return matcher.group(1);
      } else {
       // no match was found, so we return empty string
       return "";
    }try running it so:
    java ArtistProblem "the artist - the track - the title.mp3" "artist - track - title"
    and you'll get:
    the artist
    i hope that gives you a jumpstart to some direction.

  • How to split string based on either space or tab delimitation?

    I'm trying to split a string into 4 fields.  The strings sometimes have space delimitation and sometimes have tab delimitation.  Is there any way to do this in a SELECT, or do I need a couple staging tables, or what?
    I'm trying to work with this.
    Select PARSENAME(replace(replace(replace(replace([Column 0],' ','<>'),'><',''),'char(9)',' '),' ','.'),4) Date,
    PARSENAME(replace(replace(replace(replace([Column 0],' ','<>'),'><',''),'char(9)',' '),' ','.'),3) ID,
    PARSENAME(replace(replace(replace(replace([Column 0],' ','<>'),'><',''),'char(9)',' '),' ','.'),2) Rank1,
    PARSENAME(replace(replace(replace(replace([Column 0],' ','<>'),'><',''),'char(9)',' '),' ','.'),1) Rank2
    Knowledge is the only thing that I can give you, and still retain, and we are both better off for it.

    This is similar thread that someone posted a week ago
    Split delimited string into separate columns
    based on space
    My solution was, using a user defined function to split the text:
    Use Master
    Go
    CREATE FUNCTION dbo.udf_SplitString(@InputVal VARCHAR(200), @Delimiter CHAR(1))
    RETURNS @Items TABLE (RowNo TINYINT, ITEM VARCHAR(100))
    As
    BEGIN
    DECLARE @FieldLen TINYINT = 0, @FieldEnum TINYINT = 0, @TempItem VARCHAR(100) = '', @ItemLoop TINYINT = 1
    SET @FieldLen = LEN(@InputVal)
    WHILE @FieldEnum <= @FieldLen
    BEGIN
    IF (SUBSTRING(@InputVal, @FieldEnum + 1, 1) = @Delimiter OR @FieldEnum = @FieldLen) AND @TempItem <> ''
    BEGIN
    INSERT @Items (RowNo, Item)
    VALUES (@ItemLoop, LTRIM(RTRIM(@TempItem)))
    SET @TempItem = ''
    SET @ItemLoop += 1
    END
    ELSE
    BEGIN
    IF SUBSTRING(@InputVal, @FieldEnum + 1, 1) <> @Delimiter
    BEGIN
    SET @TempItem = @TempItem + SUBSTRING(@InputVal, @FieldEnum + 1, 1)
    END
    END
    SET @FieldEnum += 1
    END
    RETURN
    END
    Next, use the splited data to group based on requirements
    DECLARE @AllData TABLE
    [Column 0] VARCHAR(50)
    INSERT INTO @AllData
    VALUES('20150101 04559690 45 33')
    INSERT INTO @AllData
    VALUES('20150101 045595320 42 48')
    INSERT INTO @AllData
    VALUES('20150101 041198690 44 34')
    INSERT INTO @AllData
    VALUES('20150101 0455222130 41 49')
    INSERT INTO @AllData
    VALUES('20150101 554567450 40 51')
    ;WITH CTE
    AS
    SELECT
    ,Row_Number() OVER(PARTITION BY MainQry.[Column 0] ORDER BY MainQry.[Column 0]) As RowNo
    FROM
    @AllData As mainQry
    CROSS APPLY (SELECT Item FROM Master.dbo.udf_SplitString(REPLACE(MainQry.[Column 0], CHAR(9), ' '), ' ')) As SubQry
    SELECT
    [Column 0]
    ,MAX(CASE WHEN RowNo = 1 THEN Item ELSE '' END) AS [DATE]
    ,MAX(CASE WHEN RowNo = 2 THEN Item ELSE '' END) AS [ID]
    ,MAX(CASE WHEN RowNo = 3 THEN Item ELSE '' END) AS [Rank1]
    ,MAX(CASE WHEN RowNo = 4 THEN Item ELSE '' END) AS [Rank2]
    FROM
    CTE
    GROUP BY
    [Column 0]
    Output
    Column 0 | DATE
    | ID
    | Rank1 | Rank2
    20150101 0455222130
    41 49
    | 20150101
    | 0455222130
    | 41 | 49
    20150101 554567450
    40 51
    | 20150101
    | 554567450
    | 40 | 51
    20150101 041198690 44  34
    | 20150101
    | 041198690
    | 44 | 34
    20150101 045595320 42   48
    | 20150101
    | 045595320
    | 42 | 48
    20150101 04559690 45  33
    | 20150101
    | 04559690 | 45
    | 33
    Best Wishes, Arbi; Please vote if you find this posting was helpful or Mark it as answered.

  • Problem while splitting a string based on ' comma '

    Hi,
    I'm trying to upload a file in .csv format into an internal table. For this i'm declaring an internal table it_iflat and a work area wa_xflat as shown below.
    DATA:  it_iflat type table of string,
           wa_xflat type string.
    Now, once i have data in it_iflat..i loop at each record and split it at the occurance of a comma. as shown below.
    DATA:  it_irec type table of string with header line.
    loop at it_iflat into wa_xflat.
         clear it_irec.
        refresh it_irec.
        split wa_xflat at ',' into table it_irec.
    This is working fine when the <b>last column</b> of the excel sheet is populated. But when this field is left blank in the excel sheet..the total number of values that i get in it_irec is one less than the actual.
    Is this happening because the last column doesn't have a value and since its after the last comma..its getting neglected?
    Could anyone please let me know how to resolve this.
    Thanks in advance
    Harsha.

    If there is a value in the last column, then the value should appear in the last column of your itab.
    Maybe try it this way instead.
    report zrich_0001.
    data: it_iflat type table of string,
          wa_xflat type string.
    data: begin of it_irec occurs 0,
          fld1(10) type c,
          fld2(10) type c,
          fld3(10) type c,
          end of it_irec.
    clear it_irec.   refresh it_irec.
    loop at it_iflat into wa_xflat.
      clear it_irec.
      split wa_xflat at ',' into it_irec-fld1
                                 it_irec-fld2
                                 it_irec-fld3.
      append it_itrec.
    endloop.
    Regards,
    Rich Heilman
    Message was edited by: Rich Heilman

  • Sql query related to beaking the string based on string postion

    Hi,
    I have coloumn in this way
    city_state
    texas tx
    sanantanio tx
    newyork ny
    newjersy nj
    newyork
    newjersy
    landon 1000
    I want to get the last characters after the space from the string(eg: texas tx) only tx, that means i want to only break the strings that have space in the 3rd position when counting the string from back. the others records that do not match as above stated should decoded as 'unknown'
    (eg 'landon 1000' decode as unknown or 'newyork' decode to unknown )
    can anyone please help out on this query.
    thanks,
    Ram

    with t as (
               select 'texas tx' city_state from dual union all
               select 'sanantanio tx' from dual union all
               select 'newyork ny' from dual union all
               select 'newjersy nj' from dual union all
               select 'newyork ' from dual union all
               select 'newjersy' from dual union all
               select 'landon 1000' from dual
    select  city_state,
            case
              when regexp_like(city_state,' ..$') then substr(city_state,-2)
              else 'unknown'
            end state
      from  t
    CITY_STATE    STATE
    texas tx      tx
    sanantanio tx tx
    newyork ny    ny
    newjersy nj   nj
    newyork       unknown
    newjersy      unknown
    landon 1000   unknown
    7 rows selected.
    SQL> SY.

Maybe you are looking for