EFerriss / Pynams

Python package for interpreting FTIR spectra of nominally anhydrous minerals (NAMs)
MIT License
13 stars 4 forks source link

Plotting initials along with time series for WB #33

Closed barthac closed 6 years ago

barthac commented 6 years ago

Having a little difficulty working out how to plot my initial profiles on the same plot as the 30 min data. I have made two separate 'blocks'. One with the initial profiles, one with the 30 min data and am trying to plot them on the same graph using 'axes3 = list_of_3_axes'. Checked that the areas for the two blocks are indeed different so they should be plotting on top of each other.

My plotting code looks like this:

fig, list_of_3_axes = ETFS_Init_Ea.plot_diffusion(time_seconds=3*3600.,labelD=False, wholeblock_data=True, wholeblock_diffusion=True, style_data={'color': 'r'})

ETFS_30min_Ea.plot_diffusion(axes3=list_of_3_axes, time_seconds=3*3600.,labelDy=0.2, wholeblock_data=True, wholeblock_diffusion=True, style_data={ 'color': 'b'})

EFerriss commented 6 years ago

What is the error message? Or is the second group just not showing up? Does the second block of data plot ok when you are not trying to put it on the same group of 3 axes?

EFerriss commented 6 years ago

Try using block.plot_areas_3panels() instead of plot_diffusion() just to start with.

EFerriss commented 6 years ago

I also just realized there isn't a clear example for the initial profiles in the example notebook. I'll work on that.

EFerriss commented 6 years ago

I bet it's getting confused because it doesn't know what the initial profiles are supposed to be for making the whole block code.

barthac commented 6 years ago

There is no error message, just second group doesn't plot. Second block of data plots fine on its own graph.

barthac commented 6 years ago

They both plot on the same graph if I use plot_areas_3panels() instead

EFerriss commented 6 years ago

I think you can use plot_areas_3panels() and then add the diffusion curve with plot_diffusion(show_data=False) to get what you want.

EFerriss commented 6 years ago

Let me know how that goes. I also added some clarification, especially about specifying each profile's initial_profile, in the examples.

barthac commented 6 years ago

The new example is very helpful! Thanks!