annuler
Affichage des résultats de 
Rechercher plutôt 
Vouliez-vous dire : 

Fill just a portion of a XY graph

Hello all,

 

I would like to know if somebody here knows how to fill just a portion on the XY graphs, I'm plotting the displacement versus force and also calculating the area under the curve. The area is defined by two cursors (X1 and X2), what I would like to do is to fill only that portion of the graph (between X1 and X2) not all the plot, I used the fill to option and it fill all the plot completed. PLease take a look on the attached picture for a better reference

Thanks for your help!

 

0 Compliments
Message 1 sur 18
4 828 Visites

Create a second plot with the same data, but remove the out of range data or replace it with NaN. Create the fill on the second plot only.

Message 2 sur 18
4 806 Visites
I would double check the NaN + fill combination, I do not remember it ending well.
0 Compliments
Message 3 sur 18
4 796 Visites

Please check this example. It is done using 500 random numbers by creating a supplementary waveform and replacing there with NAN 100 points in the beginning and 100 points at the end.  I hope this is what you want.

0 Compliments
Message 4 sur 18
4 767 Visites

Sorry I forgot the attachment.

0 Compliments
Message 5 sur 18
4 763 Visites

Fill to NaN appears to work, except perhaps for some tiny graphical glitches on the y=0 pixel row.

 

partial_fill.jpg

Thoric (CLA, CLED, CTD and LabVIEW Champion)


0 Compliments
Message 6 sur 18
4 759 Visites

I hope the attachment will be visible now.

0 Compliments
Message 7 sur 18
4 741 Visites

@Thoric wrote:

Fill to NaN appears to work, except perhaps for some tiny graphical glitches on the y=0 pixel row.

 


Set the y minimum <0 to see the origin of those now not-so-tiny graphical glitches.

0 Compliments
Message 8 sur 18
4 718 Visites

Hello Nicku thanks a lot for your help, but unfortunately I cannot see the file you just attached Smiley triste

can you upload it on labview version 8.5 or lower, that will help for sure

 

thank you!

0 Compliments
Message 9 sur 18
4 714 Visites

Hello altenbach I saw you are a very active and trusted member of this forum, I need to say that I got understand your suggestion making a second plot with the specific section, but what is not so clear to me is the usage of the NaN, I'm not familiarized with that constant and would like to know how it works, can you help explaining that with a sample?

 

Thank you very much for your advice!

 

I will appreciate your response

0 Compliments
Message 10 sur 18
4 713 Visites