0

After this question Annotate data points while plotting from Pandas DataFrame where the points are annotated while plotting from pandas data frame. I want to search the annotate data points and show only the ones specified in the search and then update the plot with the result of the search. How do i do this ?

Community
  • 1
  • 1
catvsrat
  • 27
  • 1
  • 7
  • @Dan Allan can you please help me in solving this ? – catvsrat Nov 13 '13 at 03:34
  • 1
    What have you tried? Which part are you having trouble with? Can you show use any code? – tacaswell Nov 13 '13 at 04:30
  • 1
    Broadly, all you need is that linked answer of mine and some facility with getting subsections of DataFrames according to some criterion. (I assume this what you mean by "search.") Take a look at [this docs page](http://pandas.pydata.org/pandas-docs/stable/indexing.html) and then report back with more detail. – Dan Allan Nov 13 '13 at 14:11
  • @DanAllan so the detailed question is that, i have three columns of a csv file that i need to plot X, Y and ID. I applied your answer to get the xy plot and the ID at the top of each points. As in the figure, https://drive.google.com/file/d/0B72DnOP2_oMRaGdSLXlDUU5fdlk/edit?usp=sharing. I want to be able to have a select by ID button feature where i can input " Search by ID: 12-22 and the figure will be updated based on the filtering criteria. Also i want to be to Show/Hide the label by clicking a button. Thanks – catvsrat Nov 14 '13 at 15:54
  • @tcaswell i have used Dan Allan answer http://stackoverflow.com/questions/15910019/annotate-data-points-while-plotting-from-pandas-dataframe/15911372#15911372 to get the xy plot with a ID on top. I am not sure about the Search by ID and Show/Hide Label button feature. Thanks – catvsrat Nov 14 '13 at 15:57
  • 1
    As the question stands you are basically asking us to write your entire program for you. Please show us what you have tried to write a search function and what you have tried to show/hid labels. – tacaswell Nov 14 '13 at 17:35

0 Answers0