The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Order text labels in graphs

franz_josef_brofranz_josef_bro Member Posts: 3 Contributor I

Hi,

 

completely new to RM and really astonished about the possibilities I am just trying to solve following problem:

I have a data set with some text columns. I want to show a graph of scatter or histogram type and want to put the contents of the text columns to x- and/or y-axis. The sequential order of the texts is always disordered I assume in the sequence of the data set occurance. I already tried to sort these columns in the data set before building the graph but that does not change anything.

 

Is it possible to put the text labels in the graph axis into ascending or descending order?

 

One other question (more simple I hope): I tried to zoom in and out in a graph display with right mouse click (context menu). This offers zoom functions for x- and y-axis and also an autorange functon. These do not seem to work because nothing happens when clicking them. Is there something I missed or forgot?

 

I am using RM studio version 7.2.002 under Windows 7.

 

Thanks for any help;-)

0
0 votes

Fixed and Released · Last Updated

Original post is outdated and ignored. The issue by DocMusher is to be fixed in 9.5.1 #direct fix on patch (no ticket)

Comments

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    Hi there and welcome to the community!

     

    You've found one of those little quirks in RapidMiner that I wish was easier to manage.  It would certainly be nice if RapidMiner provided the option to reorder the axis labels at the point when the graph is generated, but that's not the case.  

     

    However, you can set up your data in advance for graphing by using the "Sort" (either ascending or descending) operator on the attrbitue that you intend to use as your categorical axis label.  If the values are numeric, then they should end up in the correct order.  

     

    If they are alphabetical, then they'll be sorted alphabetically.  If that doesn't suit you, then you can rename the values inside the attribute to include a leading digit which will force the order that you want.  So, for example, if you have a survey response with 3 values such as (infrequently, regularly, always), there isn't any alphabetic ordering that puts them in the "correct" order (whether ascending or descending).   So you would probably want to rename them (1-infrequently, 2-regularly, 3-always) or something similar to get them to order appropriately.

     

    If you want to see a related product enhancement request (and vote for it) for labels generated by the various binning functions, check out this other post:

    http://community.rapidminer.com/t5/Product-Ideas/better-default-naming-of-bins-using-quot-range-quot/idi-p/33188

     

    Best,

     

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • franz_josef_brofranz_josef_bro Member Posts: 3 Contributor I

    Thanks Brian for the quick answer!


    If they are alphabetical, then they'll be sorted alphabetically.

    Exactly that would be what I want but it is not the case that the texts are sorted in aphabetical order. I have already texts which are like "1C100", "3B227", "0B333", etc. and they are not sorted in the charts.

    However I found out in the meantime that the texts are sorted in the "Advanced Charts" screen without having any setting. Don't know why.

    But problem is (I've just learnt in this forum) that I can not put an advanced chart into a process.

     

    Any other idea?

  • Telcontar120Telcontar120 RapidMiner Certified Analyst, RapidMiner Certified Expert, Member Posts: 1,635 Unicorn

    No, sadly there is no easy way to generate advanced charts using a process. :-(

     

    But using the Sort operator on the relevant arritrbute before plotting a standard graph in a report operator should do the trick.  I've actually done this several times myself so I'm pretty confident that it works (although it may have some bugs I've not encountered).  In fact it can even be done inside a loop so you can produce multiple sorted graphs automatically.  

     

    If it doesn't seem to work, try this troubleshooting.  First add the sort operator to your process, and then place a breakpoint after it.  Then check the data manually---are the values appearing in the order you want them (you many need to do some serious scrolling to find out the order, depending on the size of your dataset)?  If not, the problem isn't with the graph, it's with your attribute values, which might have leading blanks or spaces, etc.  If the values are sorting in the correct order, then at that point, immediately generate the graph manually, and as long as you are using the same sorted attribute as your category label then the values should appear in the same (sorted) order.  Once you confirm that, then you can try generating the same graph via the report operator.  Be sure to do it immediately after the sort so other operators don't affect the order of the values in between.  Figuring out where in this process things break down will help others troubleshoot if there is a deeper problem.

     

    If it doesn't seem to be working, perhaps you can to post an example process and a small data sample?  

    Brian T.
    Lindon Ventures 
    Data Science Consulting from Certified RapidMiner Experts
  • DocMusherDocMusher Member Posts: 333 Unicorn
    Hi RM friends
    I followed the suggestions to rename my weekdays by 1-Mon, 2-Tue, etc, however even sorting did not result in a x-axis starting with 1-Mon. How to fix this?
    Cheers and thanks
    Sven
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    edited November 2019
    Hi,

    This thread is very old and the information in it is no longer completely accurate. The new Visualizations will sort if the aggregation values are numbers/date, which is not the case here. So in that case, the order should be the "first encountered" order. However, unfortunately I just noticed a bug that causes the sorting to take effect for nominal columns as well, resulting in the original order of data (before the sort operator). Currently the only options around that are:
    • Use a numerical or date column to aggregate. Those are sorted as you'd expect them to
    • Write the sorted ExampleSet to Excel/CSV, and read it again. Then the sorting will also be visible in the charts because it has been shuffled internally.
    The bug will be fixed in a future version.

    Regards,
    Marco
  • Marco_BoeckMarco_Boeck Administrator, Moderator, Employee-RapidMiner, Member, University Professor Posts: 1,996 RM Engineering
    edited November 2019
    Hi,

    Patch 9.5.1 has been released this week, so this issue should be fixed now :)

    Regards,
    Marco
Sign In or Register to comment.